Dummy Auth provider

Description

This auth provider allows to sign-in with any username and password, and and then issues an access token.

After successful auth, username is saved to backend database. It is then used for creating audit records for any object change, see changed_by field.

Interaction schema

Interaction schema
https://www.plantuml.com/plantuml/svg/vLPDJm8n4BtpAoPu90H9E950K3JSb0XuCSQKtG4QkkscdKNmrplRLTPrDO8IuqUFdJTlfg_pkjjp92mbaQe0BvAa4CwIADgS9BGOMhEI8LeVYnad0naBJL3jAucQgkN0gGYMgCDgnOSw7HXUZiQmQZO4ypN8S91tiwW8IAu4OP5EA89H4WJet2nH40Y7VZzTpq2eT_DIKAj16vIPImqrxiQvUsF3F6UBgnUosZ1yWe9q49WeLaYeDY3dsbZSXQ2_m609YKCBN5jgGgk5Wcc6W52Gc1RQpvbU4LbCTSYOPg0D0QwbexSoRuxc5b7VTb-eKMUE0MgqAOlWqXOfiPeLJcMyyx9dcgDo21DVny5K6MOD_vwyQrQ9QvGqQXqtOQBJKJHMFd0JPKr2JFlyLvgqu887RcOIdNN0yArz1-VUlLf4w6B1qvIxztC-BOpan-Uz5ag6wLJlcd0mJmwGF7eV3rvbjlDf-MYD_Ql7DuxhMDhTPklGCdt14Nky4Z_tSh_dHVYDvt_N_I6MFz0zZlBFmYC=

Configuration

pydantic model horizon.backend.settings.auth.dummy.DummyAuthProviderSettings

Settings for DummyAuthProvider.

Examples

HORIZON__AUTH__PROVIDER=horizon.backend.providers.auth.dummy.DummyAuthProvider
HORIZON__AUTH__ACCESS_KEY__SECRET_KEY=secret
Fields:
field access_token: JWTSettings [Required]

Access-token related settings

pydantic model horizon.backend.settings.auth.jwt.JWTSettings

Settings related to JWT tokens.

Examples

HORIZON__AUTH__ACCESS_KEY__SECRET_KEY=somesecret
HORIZON__AUTH__ACCESS_KEY__EXPIRE_SECONDS=3600  # 1 hour
Fields:
field secret_key: SecretStr [Required]

Secret key for signing JWT tokens.

Can be any string. It is recommended to generate random value for every application instance.

field security_algorithm: str = 'HS256'

Algorithm used for signing JWT tokens.

See authlib documentation.

field expire_seconds: int = 36000

Token expiration time, in seconds