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

Avoid retrying for 5 minutes after failed key retrieval. #102

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

bbockelm
Copy link
Contributor

No description provided.

Without this, a persistent failure in the key retrieval will not
be remembered, meaning rapid-fire retries from the client will result
in a similar number of key retrieval attempts.

This causes the next_update to be set forward by 5 minutes after each
failure.
Test the behavior around an issuer failure -- as long as the cached
pubkey isn't expired, we shouldn't try again for 5 minutes.
@@ -27,6 +39,216 @@ const char ec_public_2[] = "-----BEGIN PUBLIC KEY-----\n"
"XWCq4E/g2ME/uBOdP8RE0tqle8fxYcaPikgMcppGq2ycTiLGgEYXgsq2JA==\n"
"-----END PUBLIC KEY-----\n";

/**
* Duplicate of get_cache_file from scitokens_cache.cpp; used for direct
* SQLite manipulation.
Copy link
Contributor

Choose a reason for hiding this comment

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

What’s the purpose of these duplicate functions rather than calling the library functions?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Mainly did this because the underlying functions are internal and not exported by the library as symbols... any ideas on how to get them into the executable instead of duplicating?

@bbockelm
Copy link
Contributor Author

bbockelm commented Feb 2, 2023

@djw8605 - did the equivalent of this branch ever make it into the main branch?

@bbockelm
Copy link
Contributor Author

bbockelm commented May 4, 2023

@djw8605 ping! ☝️

Did this logic make it into the main branch?

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.

2 participants