KEYCLOAK-19699 RSA key provider with key use = enc cannot select corresponding algorithm on Admin Console#8708
Conversation
mposolda
left a comment
There was a problem hiding this comment.
@tnorimat Thanks Takashi!
I've added one minor comment inline.
One more question: Is this change backwards compatible? I wonder if someone already used rsa-generated provider with the ENC use (even if he was not able to select algorithm before). Or wasn't it possible before this PR at all to use rsa-generated for the ENC?
If backwards compatibility is an issue, I wonder that possible alternative solution might be instead of introducing new provider, just change the method isSupportedRsaAlgorithm to return algorithms based on whether the use is SIG or ENC. But I am not sure... If you think this PR is fine from backwards compatible perspective, I am ok with the approach you used in the PR.
There was a problem hiding this comment.
Should the help text be updated to explicitly mention that it is used for "signatures" ? Ideally align it with the help text you used for new "enc" based provider
There was a problem hiding this comment.
@mposolda Yes, I will change the help text as follows.
"Generates RSA signature keys and creates a self-signed certificate"
|
@tnorimat ah, and I see that there are failing tests. This would also require fix... |
|
@mposolda It seems that test itself have problems. I'll try to fix them. OIDCAdvancedRequestParamsTest#testRealmPublicKeyEncryptedRequestObjectUsingKid |
|
@mposolda Also, I will consider backward compatibility issue and get back to you. |
702c8f8 to
ef388fd
Compare
|
@mposolda I've concluded that this original PR does not break backward compatibility. The reason is as follows.
These codes check key use but do not check key algorithm. Therefore, the existing key provider whose key use is "enc" and key algorithm is like "PS256" still works well. However, to check this backward compatibility by the following existing tests, I've modified the codes of OIDCAdvancedRequestParamsTest#testRealmPublicKeyEncryptedRequestObjectUsingKid |
|
There are two options to implement this feature.
I've taken the fist option by the following reasons.
|
…esponding algorithm on Admin Console
ef388fd to
faa7d57
Compare
This PR is for fixing a bug reported by keycloak-dev and by KEYCLOAK-19699 that describes it in detail.