Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RFC: Pipeline Identity Tokens #139

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

dbaumgarten
Copy link

@dbaumgarten dbaumgarten commented Nov 27, 2024

@dbaumgarten dbaumgarten force-pushed the feature/pipeline-identities branch from 47164fa to 41fe496 Compare November 27, 2024 14:27
@dbaumgarten dbaumgarten changed the title Added proposal about pipeline identity tokens RFC: Pipeline Identity Tokens Nov 27, 2024
@stuartpurgavie
Copy link

Would likely recommend against making RSA the default, seems to be a trend of moving towards EC25519 since RS256 uses PKCS#1v1.5 which is the vector for the Bleichenbacher style of attack, not sure increasing the bit size avoids the issues exploited in this style of attack. But should likely be default only, if the implementer is confident they have a closed ecosystem they should be able to specify other signing protocols.

@dbaumgarten
Copy link
Author

I mainly thought of RS256 because I think it has the widest support out there.
RFC7518 lists both RS256 and ES256 as recommended, so compatibility should be similar I guess.

Not sure if RS256 is actually affected by Bleichenbacher attacks. From reading into it it seems to mostly affect encryption via RSA and I couldn't find a source that says RS256 is affected.

- aws sts assume-role-with-web-identity --d
--provider-id "<ARN of the Identity Provider of Step 1>" \
--role-arn "<ARN of the role to be assumed>" \
--web-identity-token (( idtoken ))
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have thought a little more about this part.
The simples and cleanest approach would probably be to implement this as a var_source.

So it would the look like this:

var_sources:
- name: idtoken
  type: idtoken
  config:
    aud: ["some-audience", "some-other"]
    ttl: 15m

This would allow pipeline-authors to influence the generated token (in a controlled manner).
They can for example choose for which audiences a token is itended or how long it should stay valid.

The drawback is, that (as of now) it would be impossible to include anything more specific then team+pipeline in the token (so no job, task etc.) as these information is currently unavailble to a credenital-provider.

@dbaumgarten dbaumgarten force-pushed the feature/pipeline-identities branch from d6250a7 to 61f7ef0 Compare November 28, 2024 08:22
dbaumgarten added a commit to dbaumgarten/concourse that referenced this pull request Dec 3, 2024
Pipelines should be able to fetch a signed token containing information about their idenity

concourse/rfcs/pull/139

Signed-off-by: Daniel Baumgarten <[email protected]>
@dbaumgarten
Copy link
Author

I came up with some code to showcase how this feature could work: concourse/concourse#9035

dbaumgarten added a commit to dbaumgarten/concourse that referenced this pull request Dec 3, 2024
Pipelines should be able to fetch a signed token containing information about their idenity

concourse/rfcs/pull/139

Signed-off-by: Daniel Baumgarten <[email protected]>
dbaumgarten and others added 2 commits December 18, 2024 08:55
Signed-off-by: Daniel Baumgarten <[email protected]>
Signed-off-by: Daniel Baumgarten <[email protected]>
@dbaumgarten dbaumgarten force-pushed the feature/pipeline-identities branch from 0d8c9f9 to d861d67 Compare December 18, 2024 08:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants