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

agent/local: do not persist the agent or user token #10188

Merged
merged 3 commits into from
May 10, 2021

Conversation

dnephin
Copy link
Contributor

@dnephin dnephin commented May 5, 2021

Follow up to #9683

@mkeeler pointed out that the unexported functions are actually called by exported versions, which are used to persist the token.

This PR changes the behaviour so that we only default to the user token and agent token for the sync. Change the exported methods to only return the stored tokens associated with a specific check or service.

I renamed the unexported functions so that it is clear that these two functions are not at all related. They should have different behaviour. Using different names helps make that clear.

@dnephin dnephin added type/bug Feature does not function as expected backport/1.8 labels May 5, 2021
@dnephin dnephin requested a review from a team May 5, 2021 17:44
@vercel vercel bot temporarily deployed to Preview – consul-ui-staging May 5, 2021 21:37 Inactive
@vercel vercel bot temporarily deployed to Preview – consul May 5, 2021 21:37 Inactive
@dnephin dnephin force-pushed the dnephin/dont-persist-agent-tokens branch from 50b1787 to 98e5540 Compare May 5, 2021 21:57
@vercel vercel bot temporarily deployed to Preview – consul-ui-staging May 5, 2021 21:57 Inactive
@vercel vercel bot temporarily deployed to Preview – consul May 5, 2021 21:57 Inactive
Only default to the user token and agent token for the sync. Change the
exported methods to only return the stored tokens associated with a
specific check or service.
@dnephin dnephin force-pushed the dnephin/dont-persist-agent-tokens branch from 98e5540 to 33d1a55 Compare May 6, 2021 17:19
@vercel vercel bot temporarily deployed to Preview – consul May 6, 2021 17:19 Inactive
@vercel vercel bot temporarily deployed to Preview – consul-ui-staging May 6, 2021 17:19 Inactive
@vercel vercel bot temporarily deployed to Preview – consul-ui-staging May 6, 2021 17:24 Inactive
@vercel vercel bot temporarily deployed to Preview – consul May 6, 2021 17:24 Inactive
@dnephin
Copy link
Contributor Author

dnephin commented May 6, 2021

Hmm, two test failures are real. I'll need to figure out why.

@vercel vercel bot temporarily deployed to Preview – consul May 6, 2021 22:23 Inactive
@vercel vercel bot temporarily deployed to Preview – consul-ui-staging May 6, 2021 22:23 Inactive
dnephin added 2 commits May 6, 2021 18:35
Fallback to the default user token for synching registrations.
@dnephin dnephin force-pushed the dnephin/dont-persist-agent-tokens branch from 8e98e53 to df5e18c Compare May 6, 2021 22:48
@vercel vercel bot temporarily deployed to Preview – consul-ui-staging May 6, 2021 22:48 Inactive
@vercel vercel bot temporarily deployed to Preview – consul May 6, 2021 22:48 Inactive
@dnephin dnephin merged commit b823cd3 into master May 10, 2021
@dnephin dnephin deleted the dnephin/dont-persist-agent-tokens branch May 10, 2021 19:58
@hc-github-team-consul-core
Copy link
Collaborator

🍒 If backport labels were added before merging, cherry-picking will start automatically.

To retroactively trigger a backport after merging, add backport labels and re-run https://circleci.com/gh/hashicorp/consul/367034.

@hc-github-team-consul-core
Copy link
Collaborator

🍒✅ Cherry pick of commit b823cd3 onto release/1.10.x succeeded!

hc-github-team-consul-core pushed a commit that referenced this pull request May 10, 2021
…okens

agent/local: do not persist the agent or user token
@hc-github-team-consul-core
Copy link
Collaborator

🍒❌ Cherry pick of commit b823cd3 onto release/1.9.x failed! Build Log

@hc-github-team-consul-core
Copy link
Collaborator

🍒❌ Cherry pick of commit b823cd3 onto release/1.8.x failed! Build Log

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/bug Feature does not function as expected
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants