Skip to main content

Basic authentication

You can enable basic authentication for your application by using the --basic-auth flag of nctl:

--basic-auth    Enable/Disable basic authentication for the application.

$ nctl create app go-example --basic-auth

Once basic auth got enabled, a random password will be created. You can use the --basic-auth-credentials flag to show the username and password for your application:

$ nctl get app go-example --basic-auth-credentials

NAME USERNAME PASSWORD
go-example go-example s823m92mMowd92eb

If you want to enable or disable basic authentication for an already existing application you can use the --basic-auth flag on the nctl update app command:

$> nctl update app go-example --basic-auth=false
✓ updated Application "go-example" ⬆️

Rotating credentials

To rotate the credentials for basic authentication you can use nctl:

$ nctl update app go-example --change-basic-auth-password
✓ updated Application "go-example" ⬆️

You can see the changed credentials by using:

nctl get app go-example --basic-auth-credentials

Configuration layers

You can also enable basic authentication on other configuration layers. For example, to enable it for all applications in a project you can use:

$ nctl create config --basic-auth -p <project name>