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

feat: add method to detect public keys without prefixing #2758

Merged
merged 33 commits into from
Sep 21, 2021
Merged

Conversation

aeneasr
Copy link
Member

@aeneasr aeneasr commented Sep 20, 2021

Closes #2459

naveenpaul1 and others added 30 commits March 2, 2021 13:56
# Conflicts:
#	oauth2/handler_test.go
#	persistence/sql/persister_oauth2.go
Co-authored-by: hackerman <3372410+aeneasr@users.noreply.github.com>
Co-authored-by: hackerman <3372410+aeneasr@users.noreply.github.com>
@CLAassistant
Copy link

CLAassistant commented Sep 20, 2021

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.
3 out of 4 committers have signed the CLA.

✅ aeneasr
✅ naveenpaul1
✅ TimoDoernenburg
❌ Timo Doernenburg


Timo Doernenburg seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You have signed the CLA already but the status is still pending? Let us recheck it.

jwk/helper.go Outdated
@@ -49,13 +49,6 @@ func AsymmetricKeypair(ctx context.Context, r InternalRegistry, g KeyGenerator,
if err != nil {
return nil, nil, err
}
keys, err := r.KeyManager().GetKeySet(ctx, set)
Copy link
Member Author

Choose a reason for hiding this comment

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

I removed this because it served no purpose / did not make sense in this context and had no tests

@@ -113,7 +114,7 @@ func (j *RS256JWTStrategy) refresh(ctx context.Context) error {
return err
}

public, err := FindPublicKey(keys)
public, err := FindKeyByPrefix(keys, "public")
Copy link
Member Author

Choose a reason for hiding this comment

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

I reverted this because we still rely on the private: pattern to be available for private keys.

@codecov
Copy link

codecov bot commented Sep 20, 2021

Codecov Report

Merging #2758 (7e81f3a) into master (ec3e5d8) will decrease coverage by 2.31%.
The diff coverage is 11.33%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2758      +/-   ##
==========================================
- Coverage   52.82%   50.50%   -2.32%     
==========================================
  Files         235      235              
  Lines       14112    14721     +609     
==========================================
- Hits         7454     7435      -19     
- Misses       6028     6626     +598     
- Partials      630      660      +30     
Impacted Files Coverage Δ
.../client/admin/accept_consent_request_parameters.go 35.71% <0.00%> (-1.79%) ⬇️
...t/client/admin/accept_consent_request_responses.go 19.23% <0.00%> (ø)
...nt/client/admin/accept_login_request_parameters.go 35.71% <0.00%> (-1.79%) ⬇️
...ent/client/admin/accept_login_request_responses.go 23.80% <0.00%> (ø)
...t/client/admin/accept_logout_request_parameters.go 29.16% <0.00%> (-2.09%) ⬇️
...nt/client/admin/accept_logout_request_responses.go 19.23% <0.00%> (ø)
...client/admin/create_json_web_key_set_parameters.go 32.07% <0.00%> (-1.89%) ⬇️
.../client/admin/create_json_web_key_set_responses.go 14.70% <0.00%> (ø)
...t/client/admin/create_o_auth2_client_parameters.go 26.08% <0.00%> (-2.18%) ⬇️
...nt/client/admin/create_o_auth2_client_responses.go 14.70% <0.00%> (ø)
... and 118 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update d772748...7e81f3a. Read the comment docs.

@aeneasr aeneasr merged commit b12e70c into master Sep 21, 2021
@aeneasr aeneasr deleted the close-2459 branch September 21, 2021 05:17
aarmam added a commit to aarmam/hydra that referenced this pull request Oct 19, 2021
aarmam added a commit to aarmam/hydra that referenced this pull request Oct 19, 2021
aarmam added a commit to aarmam/hydra that referenced this pull request Oct 20, 2021
aarmam added a commit to aarmam/hydra that referenced this pull request Oct 26, 2021
aarmam added a commit to aarmam/hydra that referenced this pull request Oct 27, 2021
aarmam added a commit to aarmam/hydra that referenced this pull request Nov 2, 2021
aarmam added a commit to aarmam/hydra that referenced this pull request Nov 8, 2021
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.

None yet

4 participants