-
Notifications
You must be signed in to change notification settings - Fork 103
Add UserTokensEnabled field for Organizations #1225
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
base: main
Are you sure you want to change the base?
Conversation
bf749f0 to
62ba5e8
Compare
62ba5e8 to
7eb9144
Compare
09dc30b to
e7cf4aa
Compare
| RemainingTestableCount int `jsonapi:"attr,remaining-testable-count"` | ||
| SpeculativePlanManagementEnabled bool `jsonapi:"attr,speculative-plan-management-enabled"` | ||
| EnforceHYOK bool `jsonapi:"attr,enforce-hyok"` | ||
| UserTokensEnabled *bool `jsonapi:"attr,user-tokens-enabled"` |
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.
Why do we use a bool pointer type? false and nil are both logically equivalent, correct?
| org, err := ownerClient.Organizations.Update(ctx, orgTest.Name, options) | ||
| require.NoError(t, err) | ||
| assert.False(t, *org.UserTokensEnabled, "user tokens disabled") | ||
|
|
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.
Consider including assertions that validate the change had the intended effect, i.e. try and look up some resources and expect an error here. (& the inverse when the setting is off)
Description
Adds
UserTokensEnabledforOrganizations.This new HCP Terraform setting defaults to true. When disabled by an organization owner, user tokens will no longer be permitted to access the organization's resources through the API.
Testing plan
External links
Output from tests
Including output from tests may require access to a TFE instance. Ignore this section if you have no environment to test against.
Rollback Plan
If we need to revert this change before a go-tfe release, we will.
Changes to Security Controls
no