Skip to content

Command line tools for setting authorization credentials based on metadata present in a public cloud VM instance.

License

Notifications You must be signed in to change notification settings

SUSE-Enceladus/cloudinstancecredentials

Repository files navigation

cloudinstancecredentials

Generally in Public Cloud environments one does not want to have applications with a Web UI start automatically without a pre-populated user an password. This utility extracts information from a running instance and sets the web server for the web based UI up to use http-basicauth for login purposes.

The implementation is modular such that it can easily be expanded to other cloud frameworks and web servers.

Utilities

set-http-basic-credentials

Sets credentials for http-basic authorization in NGINX web servers.

Usage

On a supported* public cloud VM instance:

sudo set-http-basic-credentials

Alternatively, enable the one-shot service:

sudo systemctl enable set-http-basic-credentials.service

Any vhost config using this authorization should include the following config:

server {
    ...
    auth_basic	         'Authorization required';
    auth_basic_user_file /etc/nginx/cloudinstancecredentials;
    ...
}

cloudinstancecredentials-config

Writes a generic config file with generated username and password in clear text, for consumption by other scripts/processes.

Usage

On a supported* public cloud VM instance:

sudo cloudinstancecredentials-config

Alternatively, enable the one-shot systemd service:

sudo systemctl enable cloudinstancecredentials-config.service

About

Command line tools for setting authorization credentials based on metadata present in a public cloud VM instance.

Resources

License

Stars

Watchers

Forks

Packages

No packages published