get_secret

This module provides a Django management command to retrieve (decrypt) and display.

the value of a named Secret object for a specified user.

Classes

Command

Implements the logic for the manage.py get_secret command.

Command-line Arguments

–namestr, required

The name of the Secret to retrieve (not the key).

–usernamestr, required

The username the Secret should be associated with.

Functionality

  • Authenticates the user and retrieves the associated UserProfile.

  • Checks for read permission on the requested Secret.

  • Outputs the decrypted value of the Secret or errors if not authorized.

Usage Example

python manage.py get_secret –name=”my_secret” –username=”myuser”

class smarter.apps.account.management.commands.get_secret.Command(*args, **kwargs)[source]

Bases: SmarterCommand

Django manage.py get_secret command.

This command is used to retrieve the unencrypted value of a Secret.

add_arguments(parser)[source]

Add arguments to the command.

handle(*args, **options)[source]

Create the superuser account.