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: add insecure flag #26

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Conversation

JaeAeich
Copy link
Contributor

Description

Add --insecure flag to login command.

Note the issue mentioned an awkward login flow when URL is given without https the client defaults to pretending the URL with localhost which causes the cli to err.

To consider

Other things to consider opening an issue for:

  • Encrypting the password when store in ~/.harbor/config
  • Removing password as flag from login command and take it as input discreetly.
  • Currently flag --name isn't doing much, use to store multiple users and then use this config to easily login for different users, fix --name flag iverwritting the previously stored creds.

Current behaviour

 ./harbor login https://demo.goharbor.io -n jaeaeich -u admin -p Harbor12345 -i

image
image

@Vad1mo If the above mentioned issues seem reasonable maybe its worth opening issues for, do tell me so I can write further details.

Signed-off-by: Jae Aeich <jh4official@gmail.com>
@JaeAeich
Copy link
Contributor Author

@Vad1mo @OrlinVasilev, can you have a look here, for the --insecure flag, I think this PR does that but maybe I can also push schema mandate issue in this or create another one. Please do let me know also what is the schema that you expected. I thought that if config is available and there is only one --name that should be take as default and login with that, otherwise ask the user for --name else if there is no config or it is incomplete ask the user for password and username.

@Vad1mo
Copy link
Member

Vad1mo commented Feb 29, 2024

I'll look at it in more details in the next couple of days.

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.

Awkward Harbor login flow: Schema is mandatory.
2 participants