Merged
Conversation
…e final action secrets.
…igin. Falls back to reflecting request origin and then falls back to *.
…_ALLOWED_ORIGIN` env is configured to prevent any origin to make credentialed requests.
AaronPlave
commented
Feb 25, 2026
dandelany
requested changes
Feb 25, 2026
Collaborator
dandelany
left a comment
There was a problem hiding this comment.
This is looking good & passes my local testing, thanks @AaronPlave !
I have one comment below, I'm working on a quick change now to implement this, should be ready for re-review shortly.
dandelany
approved these changes
Feb 25, 2026
Collaborator
dandelany
left a comment
There was a problem hiding this comment.
Pushed an update with a drop-in extractCookies replacement calling cookie library, tests still pass & did another smoke-test locally. GH workflows are being flaky but this is ready to go once they pass.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Adds a configurable cookie forwarding mechanism to the action server, enabling actions to access an env-configured list of browser session cookies (e.g., SSO tokens) for authenticating with external services under the user's identity.
Problem: Actions that need to interact with external services sometimes need user-specific credentials that are separate from the credentials PlanDev authenticates with. These cookies may also be stored as httpOnly which means that the actions server must extract them since the client cannot read them directly. However, these credentials were not being forwarded to the actions server by the client when making a request to
/secrets. Additionally, the actions server was not passing any cookies into the action secrets and the action server CORS middleware was configured withAccess-Control-Allow-Origin=*which prevented forwarding of cookies.Approach:
credentials: 'include'on action server requests whenPUBLIC_ACTION_INCLUDE_CREDENTIALS=true(separate aerie-ui PR), causing the browser to include cookies in the request. Implemented in Include credentials when making request to action/secretsplandev-ui#1882.ACTION_COOKIE_NAMESenv var and nests them under acookiesfield in the action's secrets (avoiding namespace clashes with built-in secrets likeauthorization,user,userRole)ACTION_CORS_ALLOWED_ORIGINset: Uses the configured origin withAccess-Control-Allow-Credentials: true, enabling cookie forwarding. This is the secure, recommended configuration.ACTION_CORS_ALLOWED_ORIGINunset: Reflects the request'sOriginheader for backward compatibility but does not includeAccess-Control-Allow-Credentials. Cookies will not be forwarded in this mode.New environment variables (both optional, no impact if unset):
aerie_uiPUBLIC_ACTION_INCLUDE_CREDENTIALStrueto include browser credentials (cookies) in action server requests. Default:false.aerie_actionACTION_COOKIE_NAMESaerie_actionACTION_CORS_ALLOWED_ORIGINAccess-Control-Allow-Credentials: true. If unset, CORS uses*without credentials support (backward-compatible).Verification
=in values (e.g., base64-encoded tokens)ACTION_COOKIE_NAMES=test_ssoto your .envACTION_CORS_ALLOWED_ORIGIN=localhostto your .env if desiredPUBLIC_ACTION_INCLUDE_CREDENTIALS=truein the UI .envtest_sso=fake_token_123withdomain = localhost,secure = true, andhttpOnly = true.test_ssoappears in logged secrets in the action run resultsACTION_COOKIE_NAMESandACTION_CORS_ALLOWED_ORIGINand restarttest_ssois not present in the action run logsACTION_CORS_ALLOWED_ORIGIN=https://google.comand restartSending Action Secret Parameters FailedTest action
Documentation
Future work
N/A