Skip to content

Commit

Permalink
Merge pull request #50 from fraunhoferfokus/development
Browse files Browse the repository at this point in the history
* added environment.md
  • Loading branch information
JGottschick authored Oct 6, 2024
2 parents fe7979d + 64661cb commit 9b132ef
Show file tree
Hide file tree
Showing 4 changed files with 45 additions and 3 deletions.
2 changes: 1 addition & 1 deletion core/version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.3.7
0.3.8
22 changes: 22 additions & 0 deletions templates/ENVIRONMENT.md.tmpl
Original file line number Diff line number Diff line change
@@ -1 +1,23 @@
{{ upper ( snakecase .ModuleName ) }}_DEBUG enable debug level for logging
{{ upper ( snakecase .ModuleName ) }}_TRACING enable tracing level for logging
{{ upper ( snakecase .ModuleName ) }}_NAME set the name of the instance of the service
{{ upper ( snakecase .ModuleName ) }}_TITLE set the title in the web page
{{ upper ( snakecase .ModuleName ) }}_PORT_NB the local port of the web service (default=8080)
{{ upper ( snakecase .ModuleName ) }}_APIKEYS space separated list of valid API keys
{{ upper ( snakecase .ModuleName ) }}_SESSIONKEY
{{ upper ( snakecase .ModuleName ) }}_POLICY OPA policy for access control
{{ upper ( snakecase .ModuleName ) }}_OPASVC OPA service port to get the OPA policy for access control
{{ upper ( snakecase .ModuleName ) }}_REALM Basic authentication realm
{{ upper ( snakecase .ModuleName ) }}_STAFFUSER username of the administrator
{{ upper ( snakecase .ModuleName ) }}_STAFFPASSWORD password of the administrator
{{ upper ( snakecase .ModuleName ) }}_PARTICIPANTUSER username of the user
{{ upper ( snakecase .ModuleName ) }}_PARTICIPANTPASSWORD password of the user
{{ upper ( snakecase .ModuleName ) }}_CERTPEM certificate for TLS (HTTPS) communication
{{ upper ( snakecase .ModuleName ) }}_KEYPEM key for TLS (HTTPS) communication
{{ upper ( snakecase .ModuleName ) }}_LOGFILE filename of the logging file
{{ upper ( snakecase .ModuleName ) }}_LANGUAGE
{{ upper ( snakecase .ModuleName ) }}_LANGUAGES
{{ upper ( snakecase .ModuleName ) }}_USESSE enable support for _server side event_ communication (default=false)
{{ upper ( snakecase .ModuleName ) }}_PROGRESSDURATION default duration of the progress bar (default=100ms)
{{ upper ( snakecase .ModuleName ) }}_RAPIDOCDOC enable Rapidoc for the OpenAPI viewer (default=false)
{{ upper ( snakecase .ModuleName ) }}_ELEMENTSDOC enable Elements for the OpenAPI viewer (default=false)
4 changes: 2 additions & 2 deletions templates/core/config.go.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ import (

type Config struct {
Debug bool `default:"false"`
Version bool `default:"false"`
Service string `default:"{{.ModuleName}}"`
Version bool `default:"false" ignored:"true"`
Service string `default:"{{.ModuleName}}" ignored:"true"`
Sid string `ignored:"true"`
Name string `default:"{{.ModuleName}}"`
Title string
Expand Down
20 changes: 20 additions & 0 deletions templates/middleware/authz.rego.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,26 @@ allowAccess {
input.path == "/readyz"
}

allowEntrypoint {
getMethod
input.path == "/infoz"
}

allowAccess {
getMethod
input.path == "/infoz"
}

allowEntrypoint {
getMethod
input.path == "/robots.txt"
}

allowAccess {
getMethod
input.path == "/robots.txt"
}

allowEntrypoint {
user
# getMethod
Expand Down

0 comments on commit 9b132ef

Please sign in to comment.