On reload don't store duplicated keys#553
On reload don't store duplicated keys#553rohe merged 4 commits intoCZ-NIC:masterfrom rohe:ignore_dup_keys
Conversation
…at already are in the key bundle.
…at already are in the key bundle. Updated CHANGELOG.md .
schlenk
left a comment
There was a problem hiding this comment.
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
| ## 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.
This should not be in the 0.14.0 section.
Open a new section for still unreleased changes on top.
CHANGELOG.md
Outdated
| [#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.
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.
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.
|
If a key bundle is reloaded care should be taken to not store keys that already are in the key bundle.
CHANGELOG.md.