Commit f63d239a authored by Markus Scheidgen's avatar Markus Scheidgen
Browse files

Prepare to hide kibana and keycloak/admin in production.

parent 17f2ef1f
Pipeline #67228 passed with stages
in 13 minutes and 58 seconds
......@@ -3,6 +3,5 @@ window.nomadEnv = {
'keycloakRealm': 'fairdi_nomad_test',
'keycloakClientId': 'nomad_gui_dev',
'appBase': 'http://localhost:8000/fairdi/nomad/latest',
'kibanaBase': '/fairdi/kibana',
'debug': false
}
......@@ -2,7 +2,7 @@ import React from 'react'
import PropTypes from 'prop-types'
import { withStyles } from '@material-ui/core/styles'
import Markdown from './Markdown'
import { kibanaBase, appBase, optimadeBase, apiBase, debug, consent } from '../config'
import { appBase, optimadeBase, apiBase, debug, consent } from '../config'
import { compose } from 'recompose'
import { withApi } from './api'
import { withDomain } from './domains'
......@@ -74,7 +74,7 @@ class About extends React.Component {
(previously called *Elastic Logstash Kibana* (ELK)-stack).
This system pushes logs, events, monitoring data,
and other application metrics to a central database where it
can be analysed visually. Here is the [link to Kibana](${kibanaBase}/)
can be analysed visually by us.
### Test user
During development this GUI might not be connected to the actual NOMAD
......
......@@ -5,7 +5,6 @@ export const appBase = window.nomadEnv.appBase.replace(/\/$/, '')
export const apiBase = `${appBase}/api`
export const optimadeBase = `${appBase}/optimade`
export const guiBase = process.env.PUBLIC_URL
export const kibanaBase = window.nomadEnv.kibanaBase
export const matomoUrl = window.nomadEnv.matomoUrl
export const matomoSiteId = window.nomadEnv.matomoSiteId
export const keycloakBase = window.nomadEnv.keycloakBase
......
......@@ -112,6 +112,7 @@ elastic = NomadConfig(
)
keycloak = NomadConfig(
server_external_url='https://repository.nomad-coe.eu/fairdi/keycloak/auth/',
server_url='https://repository.nomad-coe.eu/fairdi/keycloak/auth/',
realm_name='fairdi_nomad_test',
username='admin',
......
......@@ -189,7 +189,7 @@ class Keycloak():
options = dict(verify_aud=False, verify_exp=True, verify_iss=True)
payload = jwt.decode(
g.oidc_access_token, key=key, algorithms=['RS256'], options=options,
issuer='%s/realms/%s' % (config.keycloak.server_url.rstrip('/'), config.keycloak.realm_name))
issuer='%s/realms/%s' % (config.keycloak.server_external_url.rstrip('/'), config.keycloak.realm_name))
except jwt.InvalidTokenError as e:
auth_error = str(e)
......
window.nomadEnv = {
"appBase": "/example-nomad",
"kibanaBase": "/fairdi/kibana",
"debug": false
};
\ No newline at end of file
......@@ -77,7 +77,6 @@ data:
env.js: |
window.nomadEnv = {
"appBase": "{{ .Values.proxy.external.path }}",
"kibanaBase": "{{ .Values.proxy.external.kibanaPath }}",
"keycloakBase": "{{ .Values.keycloak.serverUrl }}",
"keycloakRealm": "{{ .Values.keycloak.realmName }}",
"keycloakClientId": "{{ .Values.keycloak.guiClientId }}",
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment