diff --git a/astro/src/components/LogLevel.astro b/astro/src/components/LogLevel.astro new file mode 100644 index 000000000..b7d3988b1 --- /dev/null +++ b/astro/src/components/LogLevel.astro @@ -0,0 +1,35 @@ +--- +// LogLevel.astro +// Renders a log level name with the appropriate color from the spectrum +// Uses mode-aware colors for optimal contrast in light and dark themes + +interface Props { + level: 'Trace' | 'Debug' | 'Information' | 'Warning' | 'Error' | 'Critical'; +} + +const { level } = Astro.props; +--- + +{level} + + diff --git a/astro/src/components/LogLevelSpectrum.astro b/astro/src/components/LogLevelSpectrum.astro new file mode 100644 index 000000000..910aa6fe4 --- /dev/null +++ b/astro/src/components/LogLevelSpectrum.astro @@ -0,0 +1,307 @@ + +--- +// LogLevelSpectrum.astro +// Visual anxiety-spectrum bar for log levels with quick-reference table +--- + +
| Level | +Urgency | +Action | +
|---|---|---|
| Trace | +Dev only | +Support-requested diagnostics only. Contains sensitive data. | +
| Debug | +Dev/Staging | +Enable in dev/staging. Disable before production. May contain sensitive data. | +
| Information | +Monitor | +Normal operations. Good default for production. | +
| Warning | +Investigate | +Review when convenient. May indicate misconfiguration. | +
| Error | +Act soon | +Investigate promptly. Something failed. | +
| Critical | +Act now! | +Act immediately. System may be down. | +
| Level | +Message | +Description | +
|---|---|---|
| Cannot authenticate scheme: `{Scheme}` to acquire user access token | +Authentication failed for the specified scheme | +|
| Authentication result properties are null for scheme: `{Scheme}` after authentication | +Successful authentication but no token properties returned | +|
| Failed to get a UserToken because no tokens found in cookie properties | +`SaveTokens` must be enabled for automatic token refresh | +|
| Starting user token acquisition | +Beginning the user token retrieval process | +|
| Cannot retrieve token: No active user | +No authenticated user context available | +|
| Cannot retrieve token: No token data found in user token store for user `{User}` | +User exists but has no stored tokens | +
| Level | +Message | +Description | +
|---|---|---|
| No refresh token found in user token store for user `{User}` / resource `{Resource}`. Returning current access token | +No refresh token available; returning existing access token | +|
| No access token found in user token store for user `{User}` / resource `{Resource}`. Trying to refresh | +Missing access token; attempting refresh | +|
| Token for user `{User}` will be refreshed. Expiration: `{Expiration}`, ForceRenewal: `{ForceRenewal}` | +Token refresh triggered by expiration or explicit force | +|
| Refreshing access token using refresh token: hash=`{TokenHash}` | +Executing refresh token grant (token hashed for security) | +|
| Sending Refresh token request to: `{Url}` | +HTTP request to token endpoint | +|
| Returning refreshed token for user: `{User}` | +Refresh succeeded | +|
| Returning current token for user: `{User}` | +Using cached token (still valid) | +|
| Error refreshing access token. Error = `{Error}`, Description: `{ErrorDescription}` | +Refresh failed with OAuth error | +|
| Access Token of type `{TokenType}` refreshed with expiration: `{Expiration}` | +Successful refresh with new expiration | +
| Level | +Message | +Description | +
|---|---|---|
| Revoking refresh token: hash=`{TokenHash}` | +Starting revocation (token hashed) | +|
| Sending Token revocation request to: `{Url}` | +HTTP request to revocation endpoint | +|
| Error revoking refresh token. Error = `{Error}` | +Revocation failed | +
| Level | +Message | +Description | +
|---|---|---|
| Requesting client credentials access token at endpoint: `{Url}` | +Starting client credentials grant | +|
| Client Credentials token of type `{TokenType}` for Client: `{ClientName}` retrieved with expiration `{Expiration}` | +Token successfully obtained | +|
| Error requesting access token for client `{ClientName}`. Error = `{Error}`, Description: `{ErrorDescription}` | +Token request failed | +|
| Caching access token for client: `{ClientName}`. Expiration: `{Expiration}` | +Storing token in cache | +|
| Cache hit for obtaining access token for client: `{ClientName}` | +Using cached token | +|
| Cache miss while retrieving access token for client: `{ClientName}` | +No cached token; fetching new one | +|
| Will not cache token result with error for `{ClientName}`. Error = `{Error}`, Description: `{ErrorDescription}` | +Skipping cache for failed token | +|
| An exception has occurred while reading ClientCredentialsToken value from the cache for client `{ClientName}` | +Cache read error; falling back to fetch | +|
| Error trying to set token in cache for client `{ClientName}` | +Cache write failed | +|
| Error parsing cached access token for client `{ClientName}` | +Cached value was corrupted | +|
| Failed to obtain token from cache for client `{ClientName}` using cacheKey `{CacheKey}`. Will obtain new token | +Cache retrieval failed; fetching new token | +
| Level | +Message | +Description | +
|---|---|---|
| Sending Access token of type `{TokenType}` to endpoint: `{Url}` | +Attaching token to outgoing request | +|
| Failed to obtain an access token while sending the request. Error: `{Error}`, ErrorDescription `{ErrorDescription}` | +Could not get token; request sent without authentication | +|
| While sending a request, received UnAuthorized after acquiring a new access token | +Fresh token was rejected by the resource server | +|
| Token not accepted while sending request. Retrying with new access token | +401 response triggered token refresh and retry | +
| Level | +Message | +Description | +
|---|---|---|
| Creating DPoP proof token for token request | +Generating DPoP proof for token endpoint | +|
| Sending DPoP proof token in request to endpoint: `{Url}` | +Attaching DPoP proof to request | +|
| Failed to create DPoP proof token for request to endpoint: `{Url}` | +DPoP proof generation failed; falling back to Bearer | +|
| The authorization server has supplied a new nonce on a successful response | +Server-provided nonce stored for future requests | +|
| DPoP nonce error: `{Error}`. Retrying using new nonce | +Retrying with server-provided nonce | +|
| DPoP error `{Error}` during token refresh. Retrying with server nonce | +Nonce error during refresh; retrying | +|
| Failed to get DPoP Nonce because server didn't respond with ok. StatusCode was: `{StatusCode}` | +Nonce request failed | +|
| Cache hit for DPoP nonce for URL: `{Url}`, method: `{Method}` | +Using cached nonce | +|
| Writing DPoP nonce to Cache for URL: `{Url}`, method: `{Method}`. Expiration: `{Expiration}` | +Storing nonce in cache | +|
| Cache miss for DPoP nonce for URL: `{Url}`, method: `{Method}` | +No cached nonce available | +|
| Failed to parse the cached Nonce `{Value}` for URL: `{Url}`, method: `{Method}`. Error: `{Error}` | +Cached nonce was invalid | +
| Level | +Message | +Description | +
|---|---|---|
| Failed to parse JsonWebKey | +JWK parsing failed | +|
| Failed to create thumbprint from JSON web key | +Could not compute key thumbprint | +
| Level | +Message | +Description | +
|---|---|---|
| LoginAsync | +Beginning the login method | +|
| Starting authentication request. | +Login flow initiated | +|
| Authentication request success. | +Login completed successfully | +|
| PrepareLoginAsync | +Preparing login state for manual flow | +|
| CreateAuthorizeStateAsync | +Creating PKCE and state parameters | +|
| The IdentityProvider contains a pushed authorization request endpoint. Automatically pushing authorization parameters. Use DisablePushedAuthorization to opt out. | +PAR endpoint detected and being used | +|
| Failed to push authorization parameters | +PAR request failed | +|
| CreateAuthorizeUrl | +Building the authorization URL | +|
| CreateAuthorizeParameters | +Assembling authorize request parameters | +|
| AuthorizeAsync | +Starting browser-based authorization | +
| Level | +Message | +Description | +
|---|---|---|
| ProcessResponseAsync | +Beginning response processing | +|
| Processing response. | +Handling authorization response | +|
| Authorize response: `{Response}` | +Raw authorization response data | +|
| ProcessCodeFlowResponseAsync | +Processing authorization code flow | +|
| RedeemCodeAsync | +Exchanging code for tokens | +|
| ValidateTokenResponse | +Validating token endpoint response | +|
| `{Error}` | +Authorization or token response error | +
| Level | +Message | +Description | +
|---|---|---|
| EnsureProviderInformation | +Checking provider configuration | +|
| Skipping refresh of discovery document. | +Reusing cached discovery document | +|
| Successfully loaded discovery document | +Discovery document retrieved | +|
| Loaded keyset from `{JwksUri}` | +JSON Web Key Set location | +|
| Keyset contains the following kids: `{Kids}` | +Available signing key IDs | +|
| Error loading discovery document: `{ErrorType}` - `{Error}` | +Discovery document retrieval failed | +|
| Issuer name is missing in provider information | +Invalid provider configuration | +|
| Authorize endpoint is missing in provider information | +Invalid provider configuration | +|
| Token endpoint is missing in provider information | +Invalid provider configuration | +|
| Key set is missing in provider information | +Invalid provider configuration (when required) | +
| Level | +Message | +Description | +
|---|---|---|
| GetUserInfoAsync | +Starting userinfo request | +|
| Error contacting userinfo endpoint: `{Error}` | +Userinfo request failed | +|
| sub claim is missing from userinfo endpoint | +Userinfo response missing required claim | +|
| sub claim from userinfo endpoint is different than sub claim from identity token. | +Subject mismatch between tokens | +
| Level | +Message | +Description | +
|---|---|---|
| RefreshTokenAsync | +Starting token refresh | +|
| Failed on RefreshTokensAsync: `{Error}` - `{Description}` | +Automatic token refresh failed (RefreshTokenDelegatingHandler) | +
| Level | +Message | +Description | +
|---|---|---|
| CreateEndSessionUrl | +Building the end session URL | +
| Level | +Message | +Description | +
|---|---|---|
| ProcessClaims | +Merging claims from tokens and userinfo | +|
| Claim: `{Type}`: `{Value}` | +Individual claim being processed | +
| Level | +Message | +Description | +
|---|---|---|
| Effective options: | +Followed by serialized OidcClientOptions | +