rfcs icon indicating copy to clipboard operation
rfcs copied to clipboard

RFC: Pipeline Identity Tokens

Open dbaumgarten opened this issue 1 year ago • 6 comments

Rendered

dbaumgarten avatar Nov 27 '24 14:11 dbaumgarten

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.

stuartpurgavie avatar Nov 27 '24 19:11 stuartpurgavie

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.

dbaumgarten avatar Nov 28 '24 06:11 dbaumgarten

I came up with some code to showcase how this feature could work: https://github.com/concourse/concourse/pull/9035

dbaumgarten avatar Dec 03 '24 08:12 dbaumgarten

@aliculPix4D @marco-m-pix4d : So, what can be done to go forward with this RFC? What would be the next steps?

dbaumgarten avatar Mar 17 '25 08:03 dbaumgarten

Hello @dbaumgarten, both myself and @aliculPix4D are only contributors. Let's ask @taylorsilva if he could please chime in.

marco-m-pix4d avatar Mar 17 '25 08:03 marco-m-pix4d

Hey folks, I don't have time to go over RFC's right now. No maintainers have reviewed this RFC yet so that'll need to happen next, which basically is me reviewing it. I'll have time to do that once I get the next release out.

taylorsilva avatar Mar 18 '25 14:03 taylorsilva

@taylorsilva I really don't want to be annoying, but now that it seems like the new release is out (yay!): Would you have time to take a look at this PR? I would really like to know whether it already makes sense to start working on a fully working implementation of this.

dbaumgarten avatar Apr 22 '25 09:04 dbaumgarten

Thanks for the ping! I'm a bit deep in the ARM release stuff right now but I did want to make some time to review this stuff. I'll get to it this week as I think I've put this off long enough 😅

taylorsilva avatar Apr 22 '25 14:04 taylorsilva

Hi,

thanks for the suggestions and answers. I have updated the RFC accordingly.

dbaumgarten avatar Apr 23 '25 09:04 dbaumgarten

I was also thinking about renaming the fields of the var-source: aud -> audience ttl -> expiresIn

I think that would make things a little clearer. No need to habe overly short names there.

dbaumgarten avatar Apr 23 '25 15:04 dbaumgarten

Done. Added a section with details about the var-source. We should absolutely stick with snake_case, if thats already use everywhere else.

I also fixed a few typos here and there.

dbaumgarten avatar Apr 24 '25 06:04 dbaumgarten

@dbaumgarten I made some changes to the RFC, mostly formatting stuff. Give it a look over to check that I didn't miss anything or misrepresent anything you're proposing.

If you're good with it then I'll approve and merge the RFC. You're free to start (or continue I guess) implementing it!

taylorsilva avatar Apr 25 '25 15:04 taylorsilva

@taylorsilva Looks fine to me :)

Just one small thing: Currently the RFC states the default value vor the audience-setting is "[]". I think having a default value of nil (which means there will be no aud-claim at all in the token) is a little bit nicer. If the user really wants an empty array as the value of his aud-claim, he is free to do audience: []

dbaumgarten avatar Apr 25 '25 17:04 dbaumgarten

That's fine with me. I went back and read the RFC for JWT's: https://datatracker.ietf.org/doc/html/rfc7519#section-4.1.3

Makes sense to me to provide null instead of an empty array in case it leads to the JWT being rejected by the upstream system. Doesn't read like it would, but I see what you're getting at with suggesting the default value be null/nil.

taylorsilva avatar Apr 25 '25 19:04 taylorsilva

Great! I am quite amazed how quick and productive the discussion about this RFC was :)

I already made some more progress on the implementation today. I will ping you once it's a fully working prototype. I will probably need some help sooner or later to properly fit this feature into the codebase.

dbaumgarten avatar Apr 25 '25 21:04 dbaumgarten