-
Notifications
You must be signed in to change notification settings - Fork 259
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
On reload don't store duplicated keys #553
Conversation
…at already are in the key bundle.
…at already are in the key bundle. Updated CHANGELOG.md .
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mostly ok.
Needs some whitespace fixes and the changes to the CHANGELOG still.
We should consider if _keys could be a set(). From cursory looking it seems the order is not relevant or am i missing something?
CHANGELOG.md
Outdated
@@ -8,6 +8,7 @@ The format is based on the [KeepAChangeLog] project. | |||
## 0.14.0 [2018-05-15] | |||
|
|||
### Fixed | |||
- [#553] Made sure a a reload would not lead to duplicated keys in a keybundle. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should not be in the 0.14.0 section.
Open a new section for still unreleased changes on top.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Got it
CHANGELOG.md
Outdated
@@ -45,6 +46,7 @@ The format is based on the [KeepAChangeLog] project. | |||
[#532]: https://github.com/OpenIDC/pyoidc/pull/532 | |||
[#498]: https://github.com/OpenIDC/pyoidc/issues/498 | |||
[#534]: https://github.com/OpenIDC/pyoidc/pull/534 | |||
[#553]: https://github.com/OpenIDC/pyoidc/pull/553 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
see above, move to new section preparing for 0.15.0
tests/test_keyio.py
Outdated
"alg":"RS256", | ||
"e":"AQAB", | ||
"kty":"RSA", | ||
"n":"wkpyitec6TgFC5G41RF6jBOZghGVyaHL79CzSjjS9VCkWjpGo2hajOsiJ1RnSoat9XDmQAqiqn18rWx4xa4ErdWVqug88pLxMVmnV9tF10uJNgIi_RSsIQz40J9aKrxOotN6Mnq454BpanAxbrbC5hLlp-PIGgmWzUDNwCSfnWBjd0yGwdYKVB6d-SGNfLvdMUhFiYIX0POUnJDNl_j3kLYQ0peYRbunyQzST5nLPOItePCuZ12G5e0Eo1meSF1Md3IkuY8paqKk-vsWrT22X7CUV3HZow06ogRcFMMzvooE7yDqS53I_onsUrqgQ2aUnoo8OaD0eLlEWdaTyeNAIw","use":"sig" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
put the jwks in an extra file or make pylama happy about the overlong lines.
The order of the keys are irrelevant which make the idea about making it into a set pretty good :-) |
Hmm, making _keys a set demands that jwkest.jwk.Key is hashable which is doable. |
Let's do this first and then look at making _keys a set instead of a list. |
Codecov Report
@@ Coverage Diff @@
## master #553 +/- ##
==========================================
+ Coverage 59.58% 59.59% +<.01%
==========================================
Files 62 62
Lines 11247 11248 +1
Branches 1981 1982 +1
==========================================
+ Hits 6702 6703 +1
Misses 3987 3987
Partials 558 558
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
If a key bundle is reloaded care should be taken to not store keys that already are in the key bundle.
CHANGELOG.md
.