Skip to content

Commit

Permalink
config fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
ghstahl committed Feb 9, 2024
1 parent 201fcca commit eea403d
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 21 deletions.
4 changes: 2 additions & 2 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@
"customString": "In Flames",
"someSecret": "1234567890",
"ENABLE_GRPC_SERVER_REFLECTION": "true",
"jwtValidators__ISSUERS": "http://localhost:50053,http://host.docker.internal:50053",
"jwtValidators__JWKS_URLS": "http://localhost:50053/.well-known/jwks,http://host.docker.internal:50053/.well-known/jwks",
"jwtValidators__issuers": "http://localhost:50053,http://host.docker.internal:50053",
"jwtValidators__jwksUrls": "http://localhost:50053/.well-known/jwks,http://host.docker.internal:50053/.well-known/jwks",

},
"args": [ "serve" ]
Expand Down
4 changes: 2 additions & 2 deletions build/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,8 @@ ENV oauth2Port="50053"
ENV GRPC_GATEWAY_ENABLED="true"

ENV ENABLE_GRPC_SERVER_REFLECTION="true"
ENV jwtValidators__ISSUERS="@@@REPLACE@@@"
ENV jwtValidators__JWKS_URLS="@@@REPLACE@@@"
ENV jwtValidators__issuers="@@@REPLACE@@@"
ENV jwtValidators__jwksUrls="@@@REPLACE@@@"

# DO NOT USE CURL. imagine if someone got access to your running docker container.
#HEALTHCHECK --interval=10s --timeout=3s \
Expand Down
6 changes: 3 additions & 3 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ services:
customString: "In Flames"
someSecret: "1234567890"
ENABLE_GRPC_SERVER_REFLECTION: "true"
jwtValidators__ISSUERS: "http://starterkit:50053"
jwtValidators__JWKS_URLS: "http://starterkit:50053/.well-known/jwks"
CONFIG_FILES__CLIENT_PATH: "/config/clients.json"
jwtValidators__issuers: "http://starterkit:50053"
jwtValidators__jwksUrls: "http://starterkit:50053/.well-known/jwks"
configFiles__clientPath: "/config/clients.json"
volumes:
- ./config/clients.json:/config/clients.json
entrypoint: ["/app/server", "serve"]
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ go 1.22

require (
github.com/fluffy-bunny/fluffy-dozm-di v0.0.1
github.com/fluffy-bunny/fluffycore v1.0.64
github.com/fluffy-bunny/fluffycore v1.0.65
github.com/gogo/status v1.1.1
github.com/grpc-ecosystem/go-grpc-middleware v1.4.0
github.com/grpc-ecosystem/grpc-gateway/v2 v2.19.1
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,8 @@ github.com/felixge/fgprof v0.9.3 h1:VvyZxILNuCiUCSXtPtYmmtGvb65nqXh2QFWc0Wpf2/g=
github.com/felixge/fgprof v0.9.3/go.mod h1:RdbpDgzqYVh/T9fPELJyV7EYJuHB55UTEULNun8eiPw=
github.com/fluffy-bunny/fluffy-dozm-di v0.0.1 h1:b+F9b4edbSVn9Oio4efo62QJNspVsdmhp1KO3dxVoNQ=
github.com/fluffy-bunny/fluffy-dozm-di v0.0.1/go.mod h1:4/ZqTQ4Nwzq54c1i42mvEOabnMBJHDruBb2817viqKk=
github.com/fluffy-bunny/fluffycore v1.0.64 h1:eaWMv2+cd3cs2MdfqW3DldqlTLQBDp8mOyPBiBN4jnc=
github.com/fluffy-bunny/fluffycore v1.0.64/go.mod h1:JkbqMacniZc4aLyan4nrBMe4Skm0Y0xnuz3iC2wJgZQ=
github.com/fluffy-bunny/fluffycore v1.0.65 h1:r/Ol8tSk6liqYc103CuOf+0IZti1oken+AR1khyjnwA=
github.com/fluffy-bunny/fluffycore v1.0.65/go.mod h1:JkbqMacniZc4aLyan4nrBMe4Skm0Y0xnuz3iC2wJgZQ=
github.com/fluffy-bunny/viperEx v0.0.30 h1:/d+30YP9MQYgUieP0ImWs63gelNb/9z5AzMQwOKl0pM=
github.com/fluffy-bunny/viperEx v0.0.30/go.mod h1:y/vzpS5SQoCdc17bNglmKDX+Vz0w3BHfBCoALQZPQiA=
github.com/form3tech-oss/jwt-go v3.2.5+incompatible h1:/l4kBbb4/vGSsdtB5nUe8L7B9mImVMaBPw9L/0TBHU8=
Expand Down
22 changes: 11 additions & 11 deletions internal/contracts/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ import (

type (
JWTValidators struct {
Issuers []string `json:"issuers" mapstructure:"ISSUERS"`
JWKSURLS []string `json:"jwksUrls" mapstructure:"JWKS_URLS"`
Issuers []string `json:"issuers"`
JWKSURLS []string `json:"jwksUrls"`
}
ConfigFiles struct {
ClientPath string `json:"clientPath" mapstructure:"CLIENT_PATH"`
ClientPath string `json:"clientPath"`
}
)
type EchoConfig struct {
Expand All @@ -20,10 +20,10 @@ type EchoConfig struct {
type Config struct {
fluffycore_contracts_config.CoreConfig `mapstructure:",squash"`

ConfigFiles ConfigFiles `json:"configFiles" mapstructure:"CONFIG_FILES"`
ConfigFiles ConfigFiles `json:"configFiles"`
CustomString string `json:"customString"`
SomeSecret string `json:"someSecret" redact:"true"`
OAuth2Port int `json:"oauth2Port" mapstructure:"oauth2Port"`
OAuth2Port int `json:"oauth2Port"`
JWTValidators JWTValidators `json:"jwtValidators"`
DDProfilerConfig *fluffycore_contracts_ddprofiler.Config `json:"ddProfilerConfig"`
Echo EchoConfig `json:"echo"`
Expand All @@ -43,14 +43,14 @@ var ConfigDefaultJSON = []byte(`
"someSecret": "password",
"GRPC_GATEWAY_ENABLED": true,
"jwtValidators": {},
"CONFIG_FILES": {
"CLIENT_PATH": "./config/clients.json"
"configFiles": {
"clientPath": "./config/clients.json"
},
"ddProfilerConfig": {
"ENABLED": false,
"SERVICE_NAME": "in-environment",
"APPLICATION_ENVIRONMENT": "in-environment",
"VERSION": "1.0.0"
"enabled": false,
"serviceName": "in-environment",
"applicationEnvironment": "in-environment",
"version": "1.0.0"
},
"echo": {
"port": 9044
Expand Down

0 comments on commit eea403d

Please sign in to comment.