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

Feat: Machine Identity support for CLI commands #1630

Merged
merged 36 commits into from
Apr 16, 2024
Merged

Conversation

DanielHougaard
Copy link
Contributor

Description 📣

  • Added support for machine Identity auth for CLI commands. There are some commands which still don't support Machine Identities. There are some commands that only support JWT / user login, and those commands I haven't added MI support to.

Type ✨

  • Bug fix
  • New feature
  • Breaking change
  • Documentation

@DanielHougaard DanielHougaard self-assigned this Mar 26, 2024
@DanielHougaard DanielHougaard marked this pull request as ready for review March 26, 2024 22:55
Copy link
Collaborator

@maidul98 maidul98 left a comment

Choose a reason for hiding this comment

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

Mostly nits. Did some testing and found some bugs. Let's make sure to test all the existing commands to make sure they work just like they used to

cli/packages/util/helper.go Outdated Show resolved Hide resolved
cli/packages/util/helper.go Outdated Show resolved Hide resolved
cli/packages/cmd/folder.go Show resolved Hide resolved
cli/packages/cmd/login.go Show resolved Hide resolved
cli/packages/cmd/login.go Show resolved Hide resolved
cli/packages/cmd/token.go Show resolved Hide resolved
cli/packages/cmd/secrets.go Show resolved Hide resolved
cli/packages/cmd/secrets.go Outdated Show resolved Hide resolved
cli/packages/util/folders.go Show resolved Hide resolved
cli/packages/cmd/run.go Outdated Show resolved Hide resolved
@akhilmhdh
Copy link
Member

akhilmhdh commented Apr 16, 2024

Two issues i see is different behavior of login when its user and universal auth.

I tried user, where it asked my hosted infisical url where as universal auth,i tried with production infisical so i was stuck for some time to identity the issue as it didn't ask for self hosted.

Next issue is how much it became harder to get started. The beauty of service token was its quite straight forward. Get the token, apply it and done.

Now the issue is first i need to generate it and then i can't directly pipe it out too because of intermediate information like titles etc. Then need to manually copy it too. I feel like this will cause quite traction in usage

@maidul98
Copy link
Collaborator

maidul98 commented Apr 16, 2024

Now the issue is first i need to generate it and then i can't directly pipe it out too because of intermediate information like titles etc. Then need to manually copy it too. I feel like this will cause quite traction in usage

Added flag --silent which will allow pipe when used along with --plain

Copy link
Collaborator

@maidul98 maidul98 left a comment

Choose a reason for hiding this comment

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

lgtm

@maidul98 maidul98 merged commit 0ff0357 into main Apr 16, 2024
2 checks passed
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.

4 participants