-
Notifications
You must be signed in to change notification settings - Fork 25
Add endpoint to list (about-to-)expired wallet credentials #4224
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
reinkrul
wants to merge
9
commits into
master
Choose a base branch
from
4217-expiring-credentials-endpoint
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
9 commits
Select commit
Hold shift + click to select a range
33ca58f
Add endpoint to list (about-to-)expired credentials
reinkrul 43c7bee
Add excludeTypes filter to expiring credentials endpoint
reinkrul 76eb213
Merge remote-tracking branch 'origin/master' into 4217-expiring-crede…
reinkrul d90f116
Push expiring-credentials filtering down to the SQL store
reinkrul a338768
Merge branch 'master' into 4217-expiring-credentials-endpoint
reinkrul 8bae467
docs: clarify within param, document expiring-credentials monitoring
reinkrul cd3a3e0
fix(vcr): backfill expiration_date for JWT-encoded credentials
reinkrul 6612c66
fix(migration): use SQL Server-compatible ADD column syntax
reinkrul 1121a93
refactor(vcr): use never-expires sentinel instead of NULL for no expi…
reinkrul 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
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,10 @@ | ||
| -- +goose Up | ||
| -- expiration_date is the credential's expirationDate as seconds since Unix epoch. Credentials without | ||
| -- an expirationDate get a far-future sentinel (9999-12-31) rather than null; null marks an existing | ||
| -- row not yet backfilled. The application backfills existing rows after migration. | ||
| alter table credential add expiration_date integer null; | ||
| create index idx_credential_expiration_date on credential (expiration_date); | ||
|
|
||
| -- +goose Down | ||
| drop index idx_credential_expiration_date; | ||
| alter table credential drop column expiration_date; |
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.
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.
Since eOverdracht (and others) uses NutsAuthVCs, this list will quickly become longer and longer. I think you might want to add some additional filtering here to include or exclude certain types. Also a param to ignore already expired VCs might be a good idea since you probably want to signal for upcoming expiration?
Uh oh!
There was an error while loading. Please reload this page.
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.
That's right, we need something like that. I'm leaning towards an
excludemodel, because anincludemodel quickly becomes out of date if a new credential is introduced. So you'd have something like:The downside is that you have to explicitly (in many cases, always) exclude certain types, but at least it'll be visible for operators if the configuration is off.
Maybe... You don't want to keep being bothered if you don't clean up expired VCs, on the other hand you could've missed/ignored (and forgot) about renewing it. We could make it more flexible (at the cost of a more complex API), by adding a parameter which specifies for how long we'll keep returning it, after it expired. E.g., return VCs that expired less than a week ago.
Now I think of it, you also don't want to send e-mails (if your monitoring system does that) every day for the same VC, 30 days straight (if you're checking for VCs that expire within 30 days, every day). Not sure if we should solve that here, but it complicates things.
Proposal: keep this feature simple at first;
excludeTypesparameterThere 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.
Thinking about it, lets include expired credentials, since those should be visible so vendors can clean them up.