-
Notifications
You must be signed in to change notification settings - Fork 2
Add retry on network error capabilities to finish signing / authentication process #72
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
Open
iharthi
wants to merge
12
commits into
master
Choose a base branch
from
retry-on-network-error
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
053ed94
feat: use Esteid helper with retry on network error
iharthi 68e4163
fix: do not always use default message
iharthi 9d6f5c4
feat: do not discard session data immediately
iharthi cab9dc1
chore: fix tests and lint
iharthi 13fa824
chore: fix newer SSL version issue
iharthi d886e5e
chore: fix no cover not being correctly applied
iharthi a17d29a
fix: prevent session key rotation
iharthi 8ff65e8
fix: session data not loading properly
iharthi 1539133
chore: bump version and add changelog
iharthi 59157a0
fix: possible attribute error when loading session data
iharthi 43c6b4c
fix: only require django session where it is necessary
iharthi d5a2004
chore: remove leftover print
iharthi File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,38 @@ | ||
| # Changelog | ||
|
|
||
| All notable changes to this project will be documented in this file. | ||
|
|
||
| The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) | ||
|
|
||
|
|
||
| ## [4.3] - 2025-04-04 | ||
| ### Added | ||
| - `get_nonce` method on `AuthenticationViewMixin` that can be overridden to provide custom nonce | ||
| - `login` method on `AuthenticationViewMixin` that allows to invoke django `login` while suppressing | ||
| session key rotation. It is recommended to use this method to avoid `Invalid authentication session` error | ||
| on mobile devices with Smart ID app running on same device as the browser running your webapp; however, | ||
| you need to consider security risks. | ||
| - Changelog | ||
|
|
||
| ### Changed | ||
| - Upgrade `esteid-helper` to version [0.6.0](https://github.com/thorgate/esteid-helper/releases/tag/0.6.0) | ||
| that supports retry on network error | ||
| - Persist authentication session state after session completion, including authentication result details. | ||
| This allows to execute multiple `patch` requests within the same session, which is useful for example in case | ||
| of a network error that causes the FE to never receive the finalization response from BE. | ||
| - Persist signing session state after session completion (but not the temporary containers), for same purpose | ||
| as with authentication sessions above. | ||
|
|
||
| ### Fixed | ||
| - Use unreleased version of `oscrypto`, dependency of pyasice, that fixes compatibility with some OpenSSL versions, | ||
| for tests. If you are getting `oscrypto.errors.LibraryNotFoundError: Error detecting the version of libcrypto` | ||
| in your project you will need to fix your dependencies as well. | ||
| - Coverage report including legacy compatibility code scheduled for removal (pragma: no cover not applying properly) | ||
| - Exception messages being discarded and default exception message always being used | ||
|
|
||
| ## [4.3] - 2024-12-31 | ||
| ### Added | ||
| - Allow to provide custom random bytes to authenticate | ||
|
|
||
| [4.3]: https://github.com/olivierlacan/keep-a-changelog/compare/v4.2...v4.3 | ||
| [4.2]: https://github.com/olivierlacan/keep-a-changelog/compare/v4.1...v4.2 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,3 @@ | ||
| # pragma: no cover | ||
|
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can apply to code blocks, but not the whole file. Whole file can be excluded in |
||
| import base64 | ||
| import binascii | ||
| import logging | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Those all are now deprecated options, and pylint warns they are gone and do nothing in the config file