stripes.config.js properties
Notes:
Difference between Okapi and Eureka: Okapi-backed installations derive tenant data from the
okapi.tenantfield; Eureka-backed installations use theconfig.tenantOptionsobject, keyed by the tenant with values shaped like{ name, clientId, displayName?, sortableName? }The
namevalue must match the tenant given in the key. TheclientIdvalue is typically formatted like${tenant}-application, e.g.diku-application. Eureka-backed installations require two additional parameters in theokapiobject:authnUrl, the fully-qualified URL of the authentication (Keycloak) server (the UI will redirect to this URL for authentication)uiUrl, the fully-qualified URL where the UI will be hosted (the authentication server will redirect to this URL after successfully authenticating)
Enhanced Consortia Support (ECS) configuration options in Eureka:
Per-tenant authentication requires users to select their tenant before authenticating. It is configured by providing multiple keys to the
tenantOptionsobject.Central-tenant authentication requires all users to authenticate through the central tenant. It is configured the same way as a single-tenant installation, by providing a single key to the
tenantOptionsobject.
Below are examples of Okapi and Eureka environment configuration files.
OKAPI env
module.exports = {
okapi: {
// okapi/gateway URL
'url': 'https://folio-snapshot-okapi.dev.folio.org',
// tenant to include in X-Okapi-Tenant HTTP request headers
'tenant': 'diku'
// request timeout in milliseconds
// default: 30000
// since P
timeout: 60000,
},
config: {
// act as though user has all perms, i.e. <IfPermission> always returns true
// default: FALSE
// since A
hasAllPerms: true,
// locale to use for the login page, prior to authenticating
// default: en-US
// since R
locale: 'en-US',
// stripes logger categories
// since A
logCategories: 'core,path,action,xhr',
logPrefix: '--',
// lookup table rows to retrieve en-masse
maxUnpagedResourceCount: 2000,
// prevent the console from being cleared on logout
// default: FALSE
// since Q
preserveConsole: true,
// list permissions in the userprofile menu?
// default: FALSE
// since A
showPerms: true,
// true to hide verbose react-intl complaints
// default: false
suppressIntlErrors: true, // since H
suppressIntlWarnings: true, // since O
// use RTR instead of insecure legacy endpoints
// since Q, default: FALSE
// since S, default: TRUE, cannot be overridden
useSecureTokens: true,
// RTR customization
rtr: {
// how long before an idle session is killed? default: 4h
// default in R: 1h
// must be a string parseable by ms, e.g. 60s, 10m, 1h
idleSessionTTL: '10m',
// how long to show the "warning, session is idle" modal? default: 1m
// must be a string parseable by ms, e.g. 60s, 10m, 1h
idleModalTTL: '2m',
// which events constitute "activity" that prolongs a session?
// default: keydown, mousedown
activityEvents: ['keydown', 'mousedown', 'wheel', 'touchstart', 'scroll'],
// how long is the "your session will end!" warning shown
// before the session is, in fact, killed? default: 1m
// must be a string parseable by ms, e.g. 60s, 10m, 1h
fixedLengthSessionWarningTTL: '2m';
}
},
modules: {
// ...
'@folio/users' : {}
},
branding: {
// login page img and alt-text
// since A
logo: {
src: './path/to/login-logo.png',
alt: 'Opentown Libraries',
},
// browser tab icon
// since A
favicon: {
src: './path/to/favicon.png',
},
style: {
mainNav: {
// background color of the main navigation bar
// default: #000c
// since M
backgroundColor: "#036",
},
login: {
// background color of the login screen
// default: #fff
// since M
backgroundColor: "#fcb",
},
},
},
};EUREKA env
module.exports = {
okapi: {
// application gateway (Kong URL)
'url': 'https://folio-etesting-snapshot-kong.ci.folio.org',
// UI bundle URL
'uiUrl': 'https://localhost:3000',
// authentication gateway (Keycloak URL)
'authnUrl': 'https://folio-etesting-snapshot-keycloak.ci.folio.org',
// request timeout in milliseconds
// default: 30000
// since P
timeout: 60000
},
config: {
// act as though user has all perms, i.e. <IfPermission> always returns true
// default: FALSE
// since A
hasAllPerms: false,
// locale to use for the login page, prior to authenticating
// default: en-US
// since R
locale: 'en-US',
// stripes logger categories
// since A
logCategories: 'core,path,action,xhr',
logPrefix: '--',
// lookup table rows to retrieve en-masse
maxUnpagedResourceCount: 2000,
// prevent the console from being cleared on logout
// default: FALSE
// since Q
preserveConsole: true,
// list permissions in the userprofile menu?
// default: FALSE
// since A
showPerms: true,
// true to hide verbose react-intl complaints
// default: false
suppressIntlErrors: true, // since H
suppressIntlWarnings: true, // since O
// Since R (replaces okapi.tenant)
tenantOptions: {
diku: { name: 'diku', clientId: 'diku-application' }
},
// use RTR instead of insecure legacy endpoints
// since Q, default: FALSE
// since S, default: TRUE, cannot be overridden
useSecureTokens: true,
// RTR customization
rtr: {
// how long before an idle session is killed? default: 4h
// default in R: 1h
// must be a string parseable by ms, e.g. 30s, 10m, 1h
idleSessionTTL: '10m',
// how long to show the "warning, session is idle" modal? default: 1m
// must be a string parseable by ms, e.g. 30s, 10m, 1h
idleModalTTL: '2m',
// which events constitute "activity" that prolongs a session?
// default: keydown, mousedown
activityEvents: ['keydown', 'mousedown', 'wheel', 'touchstart', 'scroll'],
// how long is the "your session will end!" warning shown
// before the session is, in fact, killed? default: 1m
// must be a string parseable by ms, e.g. 30s, 10m, 1h
fixedLengthSessionWarningTTL: '2m'
}
},
modules: {
// ...
'@folio/users' : {}
},
branding: {
// login page img and alt-text
// since A
logo: {
src: './path/to/login-logo.png',
alt: 'Opentown Libraries',
},
// browser tab icon
// since A
favicon: {
src: './path/to/favicon.png',
},
style: {
mainNav: {
// background color of the main navigation bar
// default: #000c
// since M
backgroundColor: "#036",
},
login: {
// background color of the login screen
// default: #fff
// since M
backgroundColor: "#fcb",
},
},
},
};