OpenRoadCode
Public API reference for OpenRoadCode
Loading...
Searching...
No Matches
security.secret_manager_if.SecretManagerIf Class Reference

Retrieve secrets without exposing their storage mechanism. More...

Inheritance diagram for security.secret_manager_if.SecretManagerIf:
security.environment_variable_secret_manager.EnvironmentVariableSecretManager

Public Member Functions

str|None get_secret (self, str name)
 Return a secret value, or None when it is unavailable.
 
str require_secret (self, str name)
 Return a required secret or raise a descriptive error.
 

Detailed Description

Retrieve secrets without exposing their storage mechanism.

Member Function Documentation

◆ get_secret()

str | None security.secret_manager_if.SecretManagerIf.get_secret (   self,
str  name 
)

Return a secret value, or None when it is unavailable.

Parameters
nameStable secret name.
Returns
Secret value, or None when it is unavailable.

Reimplemented in security.environment_variable_secret_manager.EnvironmentVariableSecretManager.

◆ require_secret()

str security.secret_manager_if.SecretManagerIf.require_secret (   self,
str  name 
)

Return a required secret or raise a descriptive error.

Parameters
nameStable secret name.
Returns
Required secret value.
Exceptions
RuntimeErrorif the secret is unavailable.

The documentation for this class was generated from the following file: