diff --git a/charts/sda-svc/templates/auth-deploy.yaml b/charts/sda-svc/templates/auth-deploy.yaml index cef75c1dd..4876c196c 100644 --- a/charts/sda-svc/templates/auth-deploy.yaml +++ b/charts/sda-svc/templates/auth-deploy.yaml @@ -141,6 +141,10 @@ spec: {{- end }} - name: S3INBOX value: {{ .Values.global.ingress.hostName.s3Inbox }} + - name: INFOTEXT + value: {{ .Values.global.auth.infoText }} + - name: INFOURL + value: {{ .Values.global.auth.inforURL }} ports: - name: auth containerPort: 8080 diff --git a/charts/sda-svc/values.yaml b/charts/sda-svc/values.yaml index 3d87f09b1..7c40e647e 100644 --- a/charts/sda-svc/values.yaml +++ b/charts/sda-svc/values.yaml @@ -156,6 +156,10 @@ global: corsMethods: "" # @param corsCreds, allow credentials in the request, cors is disabled if false corsCreds: false + # @param infoText, name of the project + infoText: + # @param inforURL, URL of the project + inforURL: broker: durable: true diff --git a/sda-auth/config.go b/sda-auth/config.go index 9d64c0ddf..12ee00655 100644 --- a/sda-auth/config.go +++ b/sda-auth/config.go @@ -53,6 +53,8 @@ type Config struct { Server ServerConfig S3Inbox string ResignJwt bool + InfoURL string + InfoText string } // NewConfig initializes and parses the config file and/or environment using @@ -90,6 +92,8 @@ func (c *Config) readConfig() error { c.JwtPrivateKey = viper.GetString("JwtPrivateKey") c.JwtSignatureAlg = viper.GetString("JwtSignatureAlg") c.JwtIssuer = viper.GetString("jwtIssuer") + c.InfoURL = viper.GetString("infoUrl") + c.InfoText = viper.GetString("infoText") viper.SetDefault("ResignJwt", true) c.ResignJwt = viper.GetBool("resignJwt") diff --git a/sda-auth/config.yaml b/sda-auth/config.yaml index 0a3baa07d..e975d1c8f 100644 --- a/sda-auth/config.yaml +++ b/sda-auth/config.yaml @@ -22,3 +22,5 @@ jwtIssuer: "http://auth:8080" jwtPrivateKey: "keys/sign-jwt.key" jwtSignatureAlg: "ES256" resignJwt: true +infoText: "About LEGA" +infoUrl: "https://elixir-europe.org/internal-projects/staff-exchange-programme/localfederated-ega" diff --git a/sda-auth/frontend/templates/index.html b/sda-auth/frontend/templates/index.html index 6f358e016..6a2651e9f 100644 --- a/sda-auth/frontend/templates/index.html +++ b/sda-auth/frontend/templates/index.html @@ -20,7 +20,7 @@ Home (current) diff --git a/sda-auth/main.go b/sda-auth/main.go index 1b169d8ae..4d5442393 100644 --- a/sda-auth/main.go +++ b/sda-auth/main.go @@ -68,6 +68,8 @@ func (auth AuthHandler) getInboxConfig(ctx iris.Context, authType string) { // getMain returns the index.html page func (auth AuthHandler) getMain(ctx iris.Context) { + ctx.ViewData("infoUrl", auth.Config.InfoURL) + ctx.ViewData("infoText", auth.Config.InfoText) err := ctx.View("index.html") if err != nil { log.Error("Failed to view index page: ", err)