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

Be able to customize the developer account password #2539

Open
guillaumerose opened this issue Jul 6, 2021 · 2 comments · May be fixed by #4451
Open

Be able to customize the developer account password #2539

guillaumerose opened this issue Jul 6, 2021 · 2 comments · May be fixed by #4451
Assignees
Labels
kind/task Workable task priority/minor status/pinned Prevents the stale bot from closing the issue

Comments

@guillaumerose
Copy link
Contributor

Now that the CA and the kubeadmin password are rotated, we are close to have a fully secured cluster. Only the developer account has always the same default password developer.

We can rotate it by default and/or add a new configuration option/flag to customize it

@stale stale bot added the status/stale Issue went stale; did not receive attention or no reply from the OP label Sep 4, 2021
@stale stale bot closed this as completed Sep 19, 2021
@praveenkumar praveenkumar reopened this Sep 20, 2021
@stale stale bot removed the status/stale Issue went stale; did not receive attention or no reply from the OP label Sep 20, 2021
@praveenkumar praveenkumar added status/pinned Prevents the stale bot from closing the issue status/stale Issue went stale; did not receive attention or no reply from the OP labels Sep 20, 2021
@stale stale bot removed the status/stale Issue went stale; did not receive attention or no reply from the OP label Sep 20, 2021
@crc-org crc-org deleted a comment from rohanKanojia Nov 8, 2024
@crc-org crc-org deleted a comment from stale bot Nov 8, 2024
@rohanKanojia
Copy link
Contributor

Hello, Could you please help me in understanding what needs to be done in order to fix this issue? I'll try to explain what I understand at the moment. Feel free to add anything in case I've missed anything.

This issue seems to be created as a follow up task done in 5a6e902

I think we want to achieve these things:

  • We need to replace hardcoded developer password to an opinionated value (just like kubeconfig password)
  • (Optional) Add another property developer-password to CRC config similar to kubeadmin-password to override opinionated developer password

To do this, we would need to refactor this method to be generic enough to generate a password for any specified user:

func GenerateKubeAdminUserPassword() error {

We would also need to update start.go to generate a password for developer user just like kubeadmin:

if err := cluster.GenerateKubeAdminUserPassword(); err != nil {
return errors.Wrap(err, "Error generating new kubeadmin password")
}
}

Also, we need to add another field in ClusterConfig struct to store developer password and adjust other structs to read it:

// GenerateKubeAdminUserPassword creates and put updated kubeadmin password to ~/.crc/machine/crc/kubeadmin-password
func GenerateKubeAdminUserPassword() error {

rohanKanojia added a commit to rohankanojia-forks/crc that referenced this issue Nov 8, 2024
rohanKanojia added a commit to rohankanojia-forks/crc that referenced this issue Nov 8, 2024
@praveenkumar
Copy link
Member

As soon as we make change to generate password for the developer user, we also need to provide a way for users to set it accordingly. Otherwise automation might not work if we random generate those and not provide option to set it as per user choice.

@rohanKanojia rohanKanojia moved this to In Progress in Eclipse JKube Nov 11, 2024
rohanKanojia added a commit to rohankanojia-forks/crc that referenced this issue Nov 11, 2024
rohanKanojia added a commit to rohankanojia-forks/crc that referenced this issue Nov 11, 2024
…rg#2539)

Add option to set developer password for the user.

```
$ crc config set developer-password mypassword
$ crc start
[...]
INFO Adding crc-admin and crc-developer contexts to kubeconfig...
Started the OpenShift cluster.

The server is accessible via web console at:
  https://console-openshift-console.apps-crc.testing

Log in as developer:
  Username: developer
  Password: mypassword
```

Signed-off-by: Rohan Kumar <[email protected]>
rohanKanojia added a commit to rohankanojia-forks/crc that referenced this issue Nov 11, 2024
rohanKanojia added a commit to rohankanojia-forks/crc that referenced this issue Nov 11, 2024
…rg#2539)

Add option to set developer password for the user.

```
$ crc config set developer-password mypassword
$ crc start
[...]
INFO Adding crc-admin and crc-developer contexts to kubeconfig...
Started the OpenShift cluster.

The server is accessible via web console at:
  https://console-openshift-console.apps-crc.testing

Log in as user:
  Username: developer
  Password: mypassword
```

Signed-off-by: Rohan Kumar <[email protected]>
rohanKanojia added a commit to rohankanojia-forks/crc that referenced this issue Nov 12, 2024
rohanKanojia added a commit to rohankanojia-forks/crc that referenced this issue Nov 12, 2024
…rg#2539)

Add option to set developer password for the user.

```
$ crc config set developer-password mypassword
$ crc start
[...]
INFO Adding crc-admin and crc-developer contexts to kubeconfig...
Started the OpenShift cluster.

The server is accessible via web console at:
  https://console-openshift-console.apps-crc.testing

Log in as user:
  Username: developer
  Password: mypassword
```

Signed-off-by: Rohan Kumar <[email protected]>
rohanKanojia added a commit to rohankanojia-forks/crc that referenced this issue Nov 12, 2024
rohanKanojia added a commit to rohankanojia-forks/crc that referenced this issue Nov 12, 2024
…rg#2539)

Add option to set developer password for the user.

```
$ crc config set developer-password mypassword
$ crc start
[...]
INFO Adding crc-admin and crc-developer contexts to kubeconfig...
Started the OpenShift cluster.

The server is accessible via web console at:
  https://console-openshift-console.apps-crc.testing

Log in as user:
  Username: developer
  Password: mypassword
```

Signed-off-by: Rohan Kumar <[email protected]>
rohanKanojia added a commit to rohankanojia-forks/crc that referenced this issue Nov 12, 2024
rohanKanojia added a commit to rohankanojia-forks/crc that referenced this issue Nov 12, 2024
…rg#2539)

Add option to set developer password for the user.

```
$ crc config set developer-password mypassword
$ crc start
[...]
INFO Adding crc-admin and crc-developer contexts to kubeconfig...
Started the OpenShift cluster.

The server is accessible via web console at:
  https://console-openshift-console.apps-crc.testing

Log in as user:
  Username: developer
  Password: mypassword
```

Signed-off-by: Rohan Kumar <[email protected]>
rohanKanojia added a commit to rohankanojia-forks/crc that referenced this issue Nov 12, 2024
rohanKanojia added a commit to rohankanojia-forks/crc that referenced this issue Nov 12, 2024
…rg#2539)

Add option to set developer password for the user.

```
$ crc config set developer-password mypassword
$ crc start
[...]
INFO Adding crc-admin and crc-developer contexts to kubeconfig...
Started the OpenShift cluster.

The server is accessible via web console at:
  https://console-openshift-console.apps-crc.testing

Log in as user:
  Username: developer
  Password: mypassword
```

Signed-off-by: Rohan Kumar <[email protected]>
rohanKanojia added a commit to rohankanojia-forks/crc that referenced this issue Nov 13, 2024
rohanKanojia added a commit to rohankanojia-forks/crc that referenced this issue Nov 13, 2024
…rg#2539)

Add option to set developer password for the user.

```
$ crc config set developer-password mypassword
$ crc start
[...]
INFO Adding crc-admin and crc-developer contexts to kubeconfig...
Started the OpenShift cluster.

The server is accessible via web console at:
  https://console-openshift-console.apps-crc.testing

Log in as user:
  Username: developer
  Password: mypassword
```

Signed-off-by: Rohan Kumar <[email protected]>
rohanKanojia added a commit to rohankanojia-forks/crc that referenced this issue Nov 18, 2024
rohanKanojia added a commit to rohankanojia-forks/crc that referenced this issue Nov 18, 2024
…rg#2539)

Add option to set developer password for the user.

```
$ crc config set developer-password mypassword
$ crc start
[...]
INFO Adding crc-admin and crc-developer contexts to kubeconfig...
Started the OpenShift cluster.

The server is accessible via web console at:
  https://console-openshift-console.apps-crc.testing

Log in as user:
  Username: developer
  Password: mypassword
```

Signed-off-by: Rohan Kumar <[email protected]>
rohanKanojia added a commit to rohankanojia-forks/crc that referenced this issue Nov 21, 2024
rohanKanojia added a commit to rohankanojia-forks/crc that referenced this issue Nov 21, 2024
…rg#2539)

Add option to set developer password for the user.

```
$ crc config set developer-password mypassword
$ crc start
[...]
INFO Adding crc-admin and crc-developer contexts to kubeconfig...
Started the OpenShift cluster.

The server is accessible via web console at:
  https://console-openshift-console.apps-crc.testing

Log in as user:
  Username: developer
  Password: mypassword
```

Signed-off-by: Rohan Kumar <[email protected]>
@rohanKanojia rohanKanojia moved this to Ready for review in Project planning: crc Nov 27, 2024
rohanKanojia added a commit to rohankanojia-forks/crc that referenced this issue Dec 13, 2024
rohanKanojia added a commit to rohankanojia-forks/crc that referenced this issue Dec 13, 2024
…rg#2539)

Add option to set developer password for the user.

```
$ crc config set developer-password mypassword
$ crc start
[...]
INFO Adding crc-admin and crc-developer contexts to kubeconfig...
Started the OpenShift cluster.

The server is accessible via web console at:
  https://console-openshift-console.apps-crc.testing

Log in as user:
  Username: developer
  Password: mypassword
```

Signed-off-by: Rohan Kumar <[email protected]>
rohanKanojia added a commit to rohankanojia-forks/crc that referenced this issue Dec 20, 2024
rohanKanojia added a commit to rohankanojia-forks/crc that referenced this issue Dec 20, 2024
…rg#2539)

Add option to set developer password for the user.

```
$ crc config set developer-password mypassword
$ crc start
[...]
INFO Adding crc-admin and crc-developer contexts to kubeconfig...
Started the OpenShift cluster.

The server is accessible via web console at:
  https://console-openshift-console.apps-crc.testing

Log in as user:
  Username: developer
  Password: mypassword
```

Signed-off-by: Rohan Kumar <[email protected]>
rohanKanojia added a commit to rohankanojia-forks/crc that referenced this issue Dec 21, 2024
…rg#2539)

Add option to set developer password for the user.

```
$ crc config set developer-password mypassword
$ crc start
[...]
INFO Adding crc-admin and crc-developer contexts to kubeconfig...
Started the OpenShift cluster.

The server is accessible via web console at:
  https://console-openshift-console.apps-crc.testing

Log in as user:
  Username: developer
  Password: mypassword
```

Signed-off-by: Rohan Kumar <[email protected]>
rohanKanojia added a commit to rohankanojia-forks/crc that referenced this issue Jan 2, 2025
rohanKanojia added a commit to rohankanojia-forks/crc that referenced this issue Jan 2, 2025
…rg#2539)

Add option to set developer password for the user.

```
$ crc config set developer-password mypassword
$ crc start
[...]
INFO Adding crc-admin and crc-developer contexts to kubeconfig...
Started the OpenShift cluster.

The server is accessible via web console at:
  https://console-openshift-console.apps-crc.testing

Log in as user:
  Username: developer
  Password: mypassword
```

Signed-off-by: Rohan Kumar <[email protected]>
@rohanKanojia rohanKanojia moved this from Review to In Progress in Eclipse JKube Jan 10, 2025
rohanKanojia added a commit to rohankanojia-forks/crc that referenced this issue Jan 10, 2025
rohanKanojia added a commit to rohankanojia-forks/crc that referenced this issue Jan 10, 2025
…rg#2539)

Add option to set developer password for the user.

```
$ crc config set developer-password mypassword
$ crc start
[...]
INFO Adding crc-admin and crc-developer contexts to kubeconfig...
Started the OpenShift cluster.

The server is accessible via web console at:
  https://console-openshift-console.apps-crc.testing

Log in as user:
  Username: developer
  Password: mypassword
```

Signed-off-by: Rohan Kumar <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/task Workable task priority/minor status/pinned Prevents the stale bot from closing the issue
Projects
Status: Ready for review
Development

Successfully merging a pull request may close this issue.

3 participants