ReadonlyREST
Portal
develop
develop
  • README
  • For Elasticsearch
    • Audit configuration
    • External to local groups mapping
    • FIPS mode
    • FLS engine
    • indices rule - Index not found scenario
    • indices rule - ES Templates handling
  • For Kibana
    • Impersonation (Enterprise)
    • Kibana 7.8.x and older
    • ReadonlyREST API
  • For ECK
  • Universal Builds
  • Examples
    • Multi-tenancy Elastic Stack (Enterprise)
    • Multi-user Elastic Stack (PRO)
    • SAML SSO (Enterprise)
      • Keycloak
      • Microsoft Azure AD
      • Microsoft ADFS
      • Duo Security MFA
    • OpenID Connect (OIDC) (Enterprise)
      • Keycloak
    • Impersonation (Enterprise)
      • Creating Test Settings
      • Defining external services mock configurations
      • Impersonating users
    • ROR cluster with Elastic Cloud integration
      • Docker-based playground
      • Configuration details
    • Custom middleware (Enterprise)
      • Enriching the metadata
      • Reject machine-to-machine traffic using custom metadata ACL rules
      • Reordering available tenancies
      • Available rorRequest API
      • Secure Logstash
      • Secure Metricbeat
  • Contribution License Agreement
  • Commercial Licenses
  • Changelog
Powered by GitBook
On this page

Was this helpful?

Edit on GitHub
  1. Examples
  2. Custom middleware (Enterprise)

Available rorRequest API

Available rorRequest API

PreviousReordering available tenanciesNextSecure Logstash

Last updated 2 years ago

Was this helpful?

You can access the rorRequest API via req.rorRequest in your custom middleware. The available options are:

Property name
Return value type
Example return value
Description

getAuthorizationHeaders()

Map<string, string>

Map(2) {'authorization' => 'Basic BWRtaW46ZGV2', 'cookie' => 'cookie value'}

Get headers using in the authorization

isAuthenticated()

boolean

true

Check if the session is authenticated

isCookiePresent(cookieName: string)

boolean or undefined

true

Check if the specific cookie is presented in the request

getIdentitySession()

IdentitySession or undefined

Check User Session identity section

Get the session identity (check the information below, for the exact response)

setIdentitySession(identitySession: IdentitySession or undefined)

void

-

Set the new session

enrichIdentitySessionMetadata(customMetadata: Record<string, unknown>)

void

-

Enrich existing user session by the additional custom metadata

lastSessionActivityDate

Date or undefined

2023-03-23T19:50:37.932Z

Date of the last session activity. Using in the context of a session timeout

extractHiddenAppsNames

string[]

[ 'Enterprise Search, Overview', 'Observability' ]

List of all hidden apps for specific users

You also have access to the standard and objects

Express.js
request
response