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

DXCDT-283: Remove config command #532

Merged
merged 6 commits into from
Dec 3, 2022
Merged

Conversation

willvedd
Copy link
Contributor

@willvedd willvedd commented Nov 29, 2022

🔧 Changes

Removes the config command. This command was undocumented and only existed to instantiate a tenant for integration tests but this functionality already exists with the auth0 tenants add command. Further, it was undocumented and not meant to be utilized by users.

This PR accomplishes a few things:

  • Have our integration tests follow the actual, idiomatic authentication mechanisms
  • Set us up for a cleaner transition when auth0 login and auth0 tenants add commands are consolidated
  • Simplify the codebase

Originally, this command was added with #291 , at a time when auth0 tenants add did not get added until #304.

📚 References

🔬 Testing

Confirms working if passes integration tests in CI.

📝 Checklist

  • All new/changed/fixed functionality is covered by tests (or N/A)
  • I have added documentation for all new/changed functionality (or N/A)

@willvedd willvedd requested a review from a team as a code owner November 29, 2022 21:09
@@ -499,14 +499,6 @@ func defaultConfigPath() string {
return path.Join(os.Getenv("HOME"), ".config", "auth0", "config.json")
}

func (c *cli) setPath(p string) {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Only used by config command.

Comment on lines +206 to +207
tenantClientID.RegisterString(cmd, &inputs.ClientID, "")
tenantClientSecret.RegisterString(cmd, &inputs.ClientSecret, "")
Copy link
Contributor Author

Choose a reason for hiding this comment

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

The auth0 tenants add command never respected the usage of of client ID and client secret flags. This fixes that.

@willvedd
Copy link
Contributor Author

Ack'ing that integration tests are failing because api command does not support client credentials as a form of authentication. That will need to be solved before this can get merged in.

@sergiught sergiught changed the base branch from main to v1 December 2, 2022 11:08
@willvedd willvedd force-pushed the DXCDT-283-remove-config-command branch from dfb4c78 to 91505e0 Compare December 2, 2022 19:19
@willvedd willvedd requested a review from Widcket December 2, 2022 19:29
@willvedd
Copy link
Contributor Author

willvedd commented Dec 2, 2022

Integration tests finally passing now that #537 has been incorporated.

@sergiught sergiught merged commit ef8b109 into v1 Dec 3, 2022
@sergiught sergiught deleted the DXCDT-283-remove-config-command branch December 3, 2022 13:32
willvedd added a commit that referenced this pull request Dec 21, 2022
* DXCDT-287: Remove format flag in favor of json flag (#533)

* DXCDT-288: Add perms alias for permissions subcommand (#534)

* DXCDT-286: Relegate --force flag from global context (#535)

* DXCDT-286: Hide global flags from commands when not applicable (#536)

* [1/4] DXCDT-266: Move domains subcommand one level up the hierarchy (#539)

* [2/4] DXCDT-266: Bring branding emails command under email templates (#540)

* Back-merging `main` into `v1` (#543)

DXCDT-293: Access token management for client credentials (#537)

* Storing and refreshing access token for client credentials

* Removing unnecessary comment

* Removing tenant name from being stored, removing flag declarations

* Removing tenant name from being stored

* Fixing erroneous delete

* Simplifying ExpiresAt assignment

* Remove duplicate addTenant in tenants add command

* Remove setting scopes on tenant when using client credentials

* Refactor how we check for token expiration while preparing the tenant

* Refactor cli.prepareTenant func

* Refactor cli.setup func

Co-authored-by: Will Vedder <[email protected]>
Co-authored-by: Sergiu Ghitea <[email protected]>

Co-authored-by: Will Vedder <[email protected]>
Co-authored-by: Sergiu Ghitea <[email protected]>

* [3/4] DXCDT-266: Rename branding cmd to universal-login (#541)

* [4/4] DXCDT-266: Update docs after branding command refactor (#542)

* DXCDT-283: Remove `config` command (#532)

Co-authored-by: Will Vedder <[email protected]>

* DXCDT-267: Consolidate `auth0 add tenants` into `auth0 login` (1/x) (#546)

Co-authored-by: Will Vedder <[email protected]>
Co-authored-by: Sergiu Ghitea <[email protected]>

* DXCDT-267: Graceful handling of access token regeneration (2/x) (#547)

Co-authored-by: Rita Zerrizuela <[email protected]>
Co-authored-by: Will Vedder <[email protected]>
Co-authored-by: Sergiu Ghitea <[email protected]>

* DXCDT-298: Interactive login prompt (3/x) (#551)

Co-authored-by: Rita Zerrizuela <[email protected]>
Co-authored-by: Will Vedder <[email protected]>
Co-authored-by: Sergiu Ghitea <[email protected]>
Co-authored-by: Sergiu Ghitea <[email protected]>

* DXCDT-295: Refactor quickstarts command to use quickstart meta URL (#553)

* DXCDT-297: Remove env var ingestion (#554)

Removing environment variable ingestion, removing unnecessary comment

Co-authored-by: Will Vedder <[email protected]>

* DXCDT-271: Add ci step to check that docs are up to date (#560)

* DXCDT-271: Move bundle install out of make docs and into docs-start (#562)

* DXCDT-296: Supporting additional scopes when authenticating as user (#561)

* Adding additional scopes support via --scopes flag

* Adding additional scopes support via --scopes flag

* Removing logging

* Uncommenting scope, removing Start function

* Condensing error to single line

* Fixing linting errors

* Changing test

* Updating docs

* Unpluralizing text, setting nil default value

* Fixing bad help text

* Tiny refactors on the login cmd

* Fixing linting error

* Update internal/auth/auth.go

Co-authored-by: Will Vedder <[email protected]>
Co-authored-by: Rita Zerrizuela <[email protected]>
Co-authored-by: Sergiu Ghitea <[email protected]>
Co-authored-by: Sergiu Ghitea <[email protected]>

* DXCDT-271: Fix generated docs (#563)

* Rename build_doc to doc-gen

* Downgrade json flag from persistent to local

* Update doc pages

* DXCDT-272 Add install script and update README (#564)

Co-authored-by: Will Vedder <[email protected]>
Co-authored-by: Will Vedder <[email protected]>

* DXCDT-273: Authentication documentation (#565)

Co-authored-by: Will Vedder <[email protected]>

* Updating README

* Targeting main branch before we forget to change back

Co-authored-by: Sergiu Ghitea <[email protected]>
Co-authored-by: Will Vedder <[email protected]>
Co-authored-by: Sergiu Ghitea <[email protected]>
Co-authored-by: Rita Zerrizuela <[email protected]>
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.

3 participants