Repository navigation
KEYCLOAK-17936 FAPI-CIBA : support Signed Authentication Request - #8006
Conversation
|
@mposolda This PR is for supporting FAPI-CIBA security profile support based on the merged OIDC CIBA feature as mentioned in the 17th FAPI-SIG meeting. Could you or your team review it? |
There was a problem hiding this comment.
@tnorimat Thanks for the PR!
I've added one inline comment regarding signature algorithms. Also I have few other comments:
- It will be nice that ClientPolicyExecutor
SecureRequestObjectExecutoris triggered somehow for the CIBA Authentication request. SimilarlySecureSigningAlgorithmExecutor(or other executor) will be probably nice to be triggered to makes sure that for the FAPI, the secured algorithms are used. But I am not sure whether to integrate with client policies here or in separate PR. Maybe it makes sense to rather use separate PR for this? As I suppose it will require to have the CIBA Authorization request event available as the type ofClientPolicyEvent, which is not yet available.
| assertEquals(oidcConfig.getBackchannelAuthenticationEndpoint(), oauth.getBackchannelAuthenticationUrl()); | ||
| assertContains(oidcConfig.getGrantTypesSupported(), OAuth2Constants.CIBA_GRANT_TYPE); | ||
| Assert.assertNames(oidcConfig.getBackchannelTokenDeliveryModesSupported(), "poll"); | ||
| Assert.assertNames(oidcConfig.getBackchannelAuthenticationRequestSigningAlgValuesSupported(), "none", Algorithm.PS256, Algorithm.PS384, Algorithm.PS512, Algorithm.RS256, Algorithm.RS384, Algorithm.RS512, Algorithm.ES256, Algorithm.ES384, Algorithm.ES512, Algorithm.HS256, Algorithm.HS384, Algorithm.HS512); |
There was a problem hiding this comment.
Question: The specification https://openid.net/specs/openid-client-initiated-backchannel-authentication-core-1_0.html#rfc.section.7.1.1 mentions
The JWT MUST be secured with an asymmetric signature and follow the guidance from Section 10.1 of [OpenID.Core] regarding asymmetric signatures.
Not sure if it is expected that algorithms like HS* are used here?
My understanding is, that none also should not be allowed here? Section 7.1.1 title is explicitly "Signed authentication request", but with none, request is in fact not signed at all.
If I am correct, is it ok to add tests that unsigned request will fail? And the test that HS256 signed request will fail (if it makes sense to have such test)?
There was a problem hiding this comment.
@mposolda Yes, that's right.
I would like to revise this PR as follows.
noneis not allowed. keycloak returns an error if CD(client) sends backchannel authentication requests with not signed authentication request.- ES*, PS* and RS* are allowed. keycloak returns an error if CD(client) sends backchannel authentication requests with signed authentication request by HS*.
- add arquillian integration tests to check the things just mentioned above.
By the way, FAPI-CIBA does not allow RS*. I would like to implement the PR for extending some existing executors to meet the requirements by FAPI-CIBA.
There was a problem hiding this comment.
+1 to everything you mentioned in the last paragraph. We can allow RS* by default, but reject it with the client policy executor similarly like we're doing for other use-cases where RS* is rejected by the executor.
|
As you said in #8006 (review) , I've been preparing the PR extending client policies to treat requests on Backchannel Authentication Endpoint. Also, I've been preparing the PR extending some existing executors to meet the requirements by FAPI-CIBA . Therefore, I would like to work as follows.
WDYT? |
|
@mposolda |
|
+1 to the stages you proposed here. Also +1 for the Device Authorization Endpoint |
|
@tnorimat I've opened the pull request Hitachi#3 to update this pull request. I've added method "isAsymmetricAlgorithm" on SignatureProvider class to be able to filter algorithms programatically instead of having hardcoded filtering of concrete provider. Hardcoded filtering may not reliably work for example for the case if someone adds new symmetric algorithm providers in the future etc. If you are fine with this, feel free to merge my PR to your branch (which should effectively update this PR against Keycloak master) |
Co-authored-by: Pritish Joshi <pritish@banfico.com> Co-authored-by: mposolda <mposolda@gmail.com>
|
@mposolda Thank you. I've merged your PR into this PR. Could you check it? |
|
@tnorimat FYI. I've created one minor follow-up JIRA https://issues.redhat.com/browse/KEYCLOAK-18583 . Figured that there is this unused method, which I forgot to remove in my PR... |
|
@mposolda I'll work on https://issues.redhat.com/browse/KEYCLOAK-18583 as soon as possible. |
|
@tnorimat Thanks! FYI. I've also created https://issues.redhat.com/browse/KEYCLOAK-18587 . Please let me know what do you think about it and if my understanding of the specification and description of the JIRA is correct. Also I've created https://issues.redhat.com/browse/KEYCLOAK-18588 |
|
@mposolda I would like to check and work on https://issues.redhat.com/browse/KEYCLOAK-18587 and https://issues.redhat.com/browse/KEYCLOAK-18588 . |
This PR is for KEYCLOAK-11846 OpenID Connect Financial-grade API: Client Initiated Backchannel Authentication Profile, also is the part of the project FAPI-CIBA(poll mode) of FAPI-SIG activity.
Based on the merged OIDC CIBA feature, this PR provides additional feature to satisfy FAPI-CIBA(poll mode) security profile. KEYCLOAK-17936 FAPI-CIBA : support Signed Authentication Request describes it more.