Table of Contents

MibAuthorizationServerConfig

Introduction

This configuration is intended for Authorization service.

Default Section

The main configuration options for the authorization server.

Keys

UseNewLoginUi

Type: boolean
Description: Sends the interactive login to the React Auth UI at FrontendAppRootUrl. Required, true, from MIB 7.0 — the React Auth UI is the only supported login. false renders the server's legacy login, which is deprecated and, since the OpenIddict engine (MEDIAIBOX-11999), no longer a working fallback; see Migrating to the New Login UI.
Default value: false — always set it explicitly.

FrontendAppRootUrl

Type: string
Description: Specifies the URL where the SPA (Single Page Application) for the Auth UI is served.
Default value: empty

Note: The Auth UI app is served by default under the base path /auth. Set this value accordingly.

CookieDomain

Type: string
Description: Domain of the server's session cookie. Set it to the shared parent domain (for example .example.com) when the Auth UI and the authorization endpoints are on different sub-domains, so the cookie the login creates reaches the authorize endpoint; otherwise the login loops (MEDIAIBOX-12134).
Default value: empty (the cookie is bound to the request host)

AuthFlowCookieName

Type: string
Description: Name of the cookie that carries a multi-step login (password, then two-factor or password change) from one step of the React Auth UI to the next.
Default value: mib_auth_flow_token

LoginFlowTokenExpirationSeconds

Type: integer
Description: How long, in seconds, a multi-step login stays valid between its steps. Values below 1 are raised to 1.
Default value: 600

SecurePassword

Type: boolean
Description: Enables secure password requirements.
Default value: false

PasswordExpiration

Type: integer
Description: Number of days before a password expires.
Default value: 7

AuthCodeExpiration

Type: integer
Description: Expiration time (in minutes) for authentication codes.
Default value: 60

RootUrl

Type: string
Description: Base URL for the authorization server.
Default value: empty

DefaultLanguage

Type: string
Description: Default language for the UI.
Default value: en-us

CookieName

Type: string
Description: Name of the authentication cookie.
Default value: empty

CookieExpireTimeSpan

Type: string
Description: Expiration timespan for the authentication cookie.
Default value: TimeSpan.MinValue

CookieSlidingExpiration

Type: boolean
Description: Enables sliding expiration for the authentication cookie.
Default value: false

Language

Type: string
Description: Language for the UI.
Default value: empty

TokenEndpoint

Type: string
Description: Path for the token endpoint.
Default value: empty

AuthorizeEndpoint

Type: string
Description: Path for the authorize endpoint.
Default value: empty

LoginEndpoint

Type: string
Description: Path for the login endpoint.
Default value: empty

LogoutEndpoint

Type: string
Description: Path for the logout endpoint.
Default value: empty

AllowInsecureHttp

Type: boolean
Description: Allows HTTP (not recommended for production).
Default value: false

AuthorizationCodeSeconds

Type: integer
Description: Expiration time (in seconds) for authorization codes.
Default value: 0

Deprecated (MEDIAIBOX-11999 / OpenIddict): no longer read. The authorization-code lifetime is now configured via AuthorizationCodeLifetime (seconds) in MibIdentityConfig.

AccessTokenMinutes

Type: integer
Description: Expiration time (in minutes) for access tokens.
Default value: 0

Deprecated (MEDIAIBOX-11999 / OpenIddict): no longer read. The access-token lifetime is now configured via AccessTokenLifetime (seconds) in MibIdentityConfig.

RefreshTokenHours

Type: integer
Description: Expiration time (in hours) for refresh tokens.
Default value: 0

Deprecated (MEDIAIBOX-11999 / OpenIddict): no longer read. The refresh-token lifetime is now configured via AbsoluteRefreshTokenLifetime / SlidingRefreshTokenLifetime (seconds) in MibIdentityConfig.

ClientId

Type: string
Description: OAuth client ID of the server's own client (an API_CLIENTS row), which the interactive login uses to complete every sign-in.
Default value: empty

ClientSecret

Type: string
Description: OAuth client secret of that client.
Default value: empty

WorkflowAssembly

Type: string
Description: Workflow assembly name.
Default value: empty

WorkflowFactory

Type: string
Description: Workflow factory class.
Default value: empty

ProfileImages

Type: string
Description: Path for profile images.
Default value: profileimages

TemProfileImages

Type: string
Description: Path for temporary profile images.
Default value: temprofileimages

EmailFromToMessages

Type: string
Description: Path for email templates.
Default value: temprofileimages

DefaultSkin

Type: string
Description: Default UI skin.
Default value: empty

ProfileImageExtensions

Type: string
Description: Allowed extensions for profile images.
Default value: jpg;jpeg;png

CustomCaptchaFontsFolder

Type: string
Description: Path for custom captcha fonts.
Default value: empty

ContactUsUri

Type: string
Description: URI for the contact us page.
Default value: #

CorsHeaders

Type: string
Description: Allowed CORS headers.
Default value: *

CorsMethods

Type: string
Description: Allowed CORS methods.
Default value: *

CorsOrigins

Type: string
Description: Allowed CORS origins.
Default value: RootUrl configured

CorsAllowCredentials

Type: boolean
Description: Allows credentials in CORS requests. (Enabling this configuration in Production environment is discouraged)
Default value: false

KnownProxies

Type: string
Description: Comma-separated list of trusted proxy IP addresses whose X-Forwarded-For header the server will honor. When the Authorization Server is deployed behind a reverse proxy or load balancer (NGINX, IIS ARR, AWS ALB, etc.), the IP captured at the application layer is the proxy's IP, not the end user's. Populate this key with each proxy IP to allow the ForwardedHeadersMiddleware to rewrite RemoteIpAddress with the real client IP from X-Forwarded-For. Example: 10.0.0.5,10.0.0.6.
Default value: empty

Note

The IPv4 loopback range 127.0.0.0/8 and the IPv6 loopback ::1 are always trusted by default. You do not need to add them here.
If neither KnownProxies nor KnownProxyNetworks is populated and the server is behind a proxy, the recorded client IP (e.g. in the ADM_USER_LOGIN_HISTORY audit table) will be the proxy's IP. Conversely, never set this to 0.0.0.0/0 or similar wildcards — an untrusted source could spoof X-Forwarded-For and pollute audit data.

KnownProxyNetworks

Type: string
Description: Comma-separated list of trusted proxy networks in CIDR notation. Use this instead of (or in addition to) KnownProxies when proxies are deployed in a subnet with rotating IPs (auto-scaling groups, Kubernetes pods, multi-AZ load balancers). Each entry follows the <address>/<prefix> form. Example: 10.0.0.0/24,172.16.0.0/12.
Default value: empty

Note

CIDR refresher:
• 10.0.0.5/32 — a single host (equivalent to listing it in KnownProxies).
• 10.0.0.0/24 — 256 hosts (10.0.0.0 to 10.0.0.255).
• 10.0.0.0/16 — 65,536 hosts.
• 10.0.0.0/8 — the entire RFC 1918 class A private range.
Prefer the narrowest range that still covers your proxy fleet.

AllowUseOfMeInAnonymousMode

Type: boolean
Description: Allows use of the /me endpoint in anonymous mode.
Default value: false

ShowFullDebugPage

Type: boolean
Description: Enables full debug page.
Default value: false

StorageTypeForUserProfileImage

Type: string
Description: Storage type for user profile images.
Default value: disk

Theme Section

The configurations for the login UI.

Keys

Type: string
Description: URI for the logo image. Can be a relative or absolute URI.
Default value: /ux/img/logo/agile-full-logo.png

ColorPrimary

Type: string
Description: Primary color for the theme (hex code).
Default value: #15C993

ColorSecondary

Type: string
Description: Secondary color for the theme (hex code).
Default value: #17316C

Examples

MIBAUTHORIZATIONSERVERCONFIG_THEME_LOGO=https://cdn.com/logo.png
MIBAUTHORIZATIONSERVERCONFIG_THEME_COLORPRIMARY=#15C993
MIBAUTHORIZATIONSERVERCONFIG_THEME_COLORSECONDARY=#17316C

DataProtection Section

Configuration for data protection and key management.

Keys

Type

Type: string
Description: Data protection type.
Default value: empty

Directory

Type: string
Description: Directory for data protection keys.
Default value: empty

DisableAutomaticKeyGeneration

Type: boolean
Description: Disables automatic key generation.
Default value: false

KeyLifetime

Type: integer
Description: Lifetime of data protection keys.
Default value: 0

AuthenticationSecurityRules Section

Rules for user authentication and account security.

Keys

BlockUserWhoDoesNotChangePasswordWithinACertainPeriodOfDays

Type: integer
Description: Number of days before a user who does not change their password is blocked.
Default value: 0

BlockInactiveUserAccountsInADefinedPeriodOfDays

Type: integer
Description: Number of days before inactive user accounts are blocked.
Default value: 0

LockServer Section

Configuration of the Lock Server — two-factor authentication (TOTP). See Two-factor authentication (TOTP).

Keys

Enabled

Type: boolean
Description: Turns the Lock Server on. When true, Type and Operations are required.
Default value: false

Type

Type: enum
Description: The provider. LocalTotp — platform-agnostic TOTP run by this server, paired with any authenticator app (use this one). Latch — Telefónica's Latch service (deprecated). An empty value with Enabled=true stops the server at startup ("Lock server type is not configured.").
Default value: empty

Operations

Type: string
Description: The operations the Lock Server takes part in, as Name:Id:Enabled, ;-separated. Required when Enabled=true. TOTP turns two-factor authentication on (under LocalTotp the Id is not used: TOTP:TOTP:true); UserChangePassword is a Latch-only operation, with the operation id created on the Latch site. See Lock Server operations.
Default value: empty

Issuer

Type: string
Description: The issuer name LocalTotp writes into the QR code — the label the authenticator app shows next to the username.
Default value: Agile Tv

Latch-only keys (deprecated)

Read only when Type=Latch; see Latch pairing.

Url

Type: string
Description: Base URL of the Latch API.
Default value: empty

ApplicationId

Type: string
Description: Application ID configured on Latch.
Default value: empty

ApplicationSecret

Type: string
Description: Application secret configured on Latch.
Default value: empty

ProxyEnabled

Type: boolean
Description: Indicates whether the requests to Latch should use a proxy.
Default value: false

ProxyUrl

Type: string
Description: Proxy URL.
Default value: empty

ProxyUserName

Type: string
Description: Proxy user name.
Default value: empty

ProxyPassword

Type: string
Description: Proxy password.
Default value: empty

ServiceWebSite, ServiceUrlLogotipo, ServiceLogotipoStyle

Type: string
Description: Website link, logo URL and logo CSS shown in the Lock Service block of the server's legacy /Account page only — the CMS does not use them. With Type=Latch the logo defaults to ux/img/logo/latch.jpg and the style to width: 90px; height: 38px; cursor: pointer;. See Lock Server logo.
Default value: empty

Who uses this configuration?

  • MibAuthorizationServer

Examples

MIBAUTHORIZATIONSERVERCONFIG_DEFAULT_SECUREPASSWORD=false
MIBAUTHORIZATIONSERVERCONFIG_DEFAULT_ROOTURL=https://auth.com
MIBAUTHORIZATIONSERVERCONFIG_DEFAULT_LANGUAGE=pt-br
MIBAUTHORIZATIONSERVERCONFIG_DEFAULT_KNOWNPROXIES=10.0.0.5,10.0.0.6
MIBAUTHORIZATIONSERVERCONFIG_DEFAULT_KNOWNPROXYNETWORKS=10.0.0.0/24,172.16.0.0/12
MIBAUTHORIZATIONSERVERCONFIG_DATAPROTECTION_KEYLIFETIME=0
MIBAUTHORIZATIONSERVERCONFIG_AUTHENTICATIONSECURITYRULES_BLOCKUSERWHODOESNOTCHANGEPASSWORDWITHINACERTAINPERIODOFDAYS=0
MIBAUTHORIZATIONSERVERCONFIG_DEFAULT_USENEWLOGINUI=true
MIBAUTHORIZATIONSERVERCONFIG_DEFAULT_FRONTENDAPPROOTURL=https://auth.com/auth/
MIBAUTHORIZATIONSERVERCONFIG_LOCKSERVER_ENABLED=true
MIBAUTHORIZATIONSERVERCONFIG_LOCKSERVER_TYPE=LocalTotp
MIBAUTHORIZATIONSERVERCONFIG_LOCKSERVER_OPERATIONS=TOTP:TOTP:true
MIBAUTHORIZATIONSERVERCONFIG_LOCKSERVER_ISSUER=MIB

Reverse proxy deployment

When the Authorization Server runs behind a reverse proxy or load balancer (NGINX, IIS ARR, AWS ALB/ELB, Kubernetes Ingress, etc.), the TCP connection seen by Kestrel originates from the proxy — not the end user. Without configuration, the real client IP is lost, which directly impacts:

  • The IP_ADDRESS column of ADM_USER_LOGIN_HISTORY (introduced in MEDIAIBOX-11773), used by the Security team to detect brute-force and credential-stuffing attacks.
  • Any feature that depends on HttpContext.Connection.RemoteIpAddress.

To restore the real client IP, populate KnownProxies and/or KnownProxyNetworks with the proxy fleet. The server uses the standard ASP.NET Core ForwardedHeadersMiddleware, configured to trust only the IPs/networks declared. If a request arrives from an undeclared source, its X-Forwarded-For is ignored — protecting the audit trail from spoofing.

Topology examples:

# Single VM, NGINX in front (same host)
MIBAUTHORIZATIONSERVERCONFIG_DEFAULT_KNOWNPROXIES=127.0.0.1,::1

# AWS ECS behind ALB in a /16 VPC
MIBAUTHORIZATIONSERVERCONFIG_DEFAULT_KNOWNPROXYNETWORKS=10.0.0.0/16

# On-prem with three fixed proxy IPs
MIBAUTHORIZATIONSERVERCONFIG_DEFAULT_KNOWNPROXIES=172.20.1.10,172.20.1.11,172.20.1.12

# Multi-layer (CloudFront → ALB → NGINX → Kestrel), trust all private ranges
MIBAUTHORIZATIONSERVERCONFIG_DEFAULT_KNOWNPROXYNETWORKS=10.0.0.0/8,172.16.0.0/12,192.168.0.0/16

The default ForwardLimit is set to 3 hops, which covers the common multi-layer topology above. Contact platform engineering if a deployment legitimately requires more.