Files
OSGAccountServer/src/main/resources/application.yaml
T
Rocky 4c9e5feec0
CI / verify (push) Has been cancelled
CI / publish (push) Has been cancelled
Make session refresh retries idempotent
Preserve the successor session for legitimate refresh retries so transient failures no longer revoke the user's session family.
2026-08-25 13:13:41 +08:00

84 lines
3.5 KiB
YAML

ktor:
application:
modules:
- com.osglab.account.ApplicationKt.module
deployment:
host: 0.0.0.0
port: "$PORT:8080"
app:
environment: "$APP_ENV:development"
publicBaseUrl: "$PUBLIC_BASE_URL:https://account.osglab.com"
inviteBaseUrl: "$INVITE_BASE_URL:https://osglab.com/i"
appStoreUrl: "$APP_STORE_URL:https://apps.apple.com/app/id0000000000"
database:
jdbcUrl: "$DATABASE_URL:jdbc:mysql://localhost:3306/osg_account?useUnicode=true&characterEncoding=utf8&connectionTimeZone=UTC&forceConnectionTimeZoneToSession=true"
username: "$DATABASE_USER:osg_account"
password: "$DATABASE_PASSWORD"
migrationUsername: "$DATABASE_MIGRATION_USER:"
migrationPassword: "$DATABASE_MIGRATION_PASSWORD:"
maximumPoolSize: "$DATABASE_POOL_SIZE:10"
session:
issuer: "$JWT_ISSUER:https://account.osglab.com"
audience: "$JWT_AUDIENCE:osgkeyboard-ios"
secret: "$JWT_SECRET"
accessMinutes: "$ACCESS_TOKEN_MINUTES:15"
refreshDays: "$REFRESH_TOKEN_DAYS:30"
legacyRefreshReplaySeconds: "$LEGACY_REFRESH_REPLAY_SECONDS:30"
gatewayGrantDays: "$GATEWAY_GRANT_DAYS:30"
encryption:
keyBase64: "$FIELD_ENCRYPTION_KEY"
antiAbuse:
identityHmacKeyBase64: "$IDENTITY_HMAC_KEY"
tombstoneRetentionDays: "$IDENTITY_TOMBSTONE_RETENTION_DAYS:365"
admin:
enabled: "$ADMIN_ENABLED:false"
mtlsRequired: "$ADMIN_MTLS_REQUIRED:true"
bootstrapEnabled: "$ADMIN_BOOTSTRAP_ENABLED:false"
bootstrapOperatorId: "$ADMIN_BOOTSTRAP_OPERATOR_ID:"
bootstrapUsername: "$ADMIN_BOOTSTRAP_USERNAME:"
bootstrapPasswordHash: "$ADMIN_BOOTSTRAP_PASSWORD_HASH:"
bootstrapTotpSecretBase32: "$ADMIN_BOOTSTRAP_TOTP_SECRET_BASE32:"
sessionHours: "$ADMIN_SESSION_HOURS:8"
maximumManualGrant: "$ADMIN_MAXIMUM_MANUAL_GRANT:100000"
hintFeed:
enabled: "$HINT_FEED_ENABLED:false"
topHubApiKey: "$TOPHUB_API_KEY:"
zoneId: "$HINT_FEED_ZONE_ID:UTC"
apple:
teamId: "$APPLE_TEAM_ID:"
keyId: "$APPLE_KEY_ID:"
clientId: "$APPLE_CLIENT_ID:com.osgkeyboard.ios"
privateKeyPem: "$APPLE_PRIVATE_KEY_PEM:"
jwksUrl: "$APPLE_JWKS_URL:https://appleid.apple.com/auth/keys"
tokenUrl: "$APPLE_TOKEN_URL:https://appleid.apple.com/auth/token"
revokeUrl: "$APPLE_REVOKE_URL:https://appleid.apple.com/auth/revoke"
credits:
signupTrial: "$SIGNUP_TRIAL_CREDITS:1000"
referralInviter: "$REFERRAL_INVITER_CREDITS:1000"
referralInvitee: "$REFERRAL_INVITEE_CREDITS:1000"
referralBindingDays: "$REFERRAL_BINDING_DAYS:7"
storeKit:
enabled: "$STOREKIT_ENABLED:false"
bundleId: "$STOREKIT_BUNDLE_ID:com.osgkeyboard.ios"
appAppleId: "$STOREKIT_APP_APPLE_ID:"
products: "$STOREKIT_PRODUCTS:"
providers:
volcengine:
endpoint: "$VOLCENGINE_ASR_ENDPOINT:wss://openspeech.bytedance.com/api/v3/sauc/bigmodel"
appId: "$VOLCENGINE_APP_ID:"
accessToken: "$VOLCENGINE_ACCESS_TOKEN:"
apiKey: "$VOLCENGINE_API_KEY:"
resourceId: "$VOLCENGINE_RESOURCE_ID:volc.seedasr.sauc.duration"
deepseek:
endpoint: "$DEEPSEEK_ENDPOINT:https://api.deepseek.com/v1"
apiKey: "$DEEPSEEK_API_KEY:"
model: "$DEEPSEEK_MODEL:deepseek-v4-flash"
reasoningModel: "$DEEPSEEK_REASONING_MODEL:"
integrity:
enforceDeviceCheck: "$ENFORCE_DEVICE_CHECK:false"
enforceAppAttest: "$ENFORCE_APP_ATTEST:false"
appleEnvironment: "$APPLE_INTEGRITY_ENVIRONMENT:development"
allowDevelopmentAppAttest: "$ALLOW_DEVELOPMENT_APP_ATTEST:false"
challengeLifetimeSeconds: "$APP_ATTEST_CHALLENGE_TTL_SECONDS:300"