Skip to content
Snippets Groups Projects

remove unused code for auth

Merged Mohammad Torkashvand requested to merge remove-unused-codes-for-auth into develop
5 files
+ 2
51
Compare changes
  • Side-by-side
  • Inline
Files
5
+ 0
39
"""Security configurations and utilities for the GSO application. Handles OAuth2 and OpenID Connect.
authentication and authorization, including token validation and user authentication. Integrates
with external authentication providers for enhanced security management.
Todo: Remove token and sensitive data from OPA console and API.
"""
from pydantic import Field
from pydantic_settings import BaseSettings
class Oauth2LibSettings(BaseSettings):
"""Common settings for applications depending on oauth2."""
ENVIRONMENT: str = "local"
SERVICE_NAME: str = ""
MUTATIONS_ENABLED: bool = False
ENVIRONMENT_IGNORE_MUTATION_DISABLED: list[str] = Field(
default_factory=list, description="Environments for which to allow unauthenticated mutations"
)
OAUTH2_ACTIVE: bool = True
OAUTH2_AUTHORIZATION_ACTIVE: bool = True
oauth2lib_settings = Oauth2LibSettings()
class Oauth2Settings(BaseSettings):
"""Configuration settings for OAuth2 and OpenID Connect (OIDC)."""
OAUTH2_RESOURCE_SERVER_ID: str = ""
OAUTH2_RESOURCE_SERVER_SECRET: str = ""
OAUTH2_TOKEN_URL: str = ""
OIDC_CONF_WELL_KNOWN_URL: str = ""
OPA_URL: str = "http://localhost:8181/v1/data/gap/gso/api/access"
oauth2_settings = Oauth2Settings()
Loading