Skip to content

Commit

Permalink
Merge pull request #108 from jhiemstrawisc/fix-oidc-config
Browse files Browse the repository at this point in the history
Fix naming of oidc config vars
  • Loading branch information
jhiemstrawisc authored Sep 6, 2023
2 parents 54ec1d8 + c61fe65 commit 4607bf7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -250,8 +250,8 @@ func InitServer() error {
viper.SetDefault("XrootdMultiuser", true)
viper.SetDefault("GeoIPLocation", "/var/cache/pelican/maxmind/GeoLite2-City.mmdb")
viper.SetDefault("NSRegistryLocation", "/var/lib/pelican/registry.sqlite")
viper.SetDefault("OIDCClientIDFile", "/etc/pelican/oidc-client-id")
viper.SetDefault("OIDCClientSecretFile", "/etc/pelican/oidc-client-secret")
viper.SetDefault("OIDC.ClientIDFile", "/etc/pelican/oidc-client-id")
viper.SetDefault("OIDC.ClientSecretFile", "/etc/pelican/oidc-client-secret")
viper.SetDefault("MonitoringData", "/var/lib/pelican/monitoring/data")
} else {
configBase, err := getConfigBase()
Expand All @@ -268,8 +268,8 @@ func InitServer() error {
viper.SetDefault("OriginUI.PasswordFile", filepath.Join(configBase, "origin-ui-passwd"))
viper.SetDefault("GeoIPLocation", filepath.Join(configBase, "maxmind", "GeoLite2-City.mmdb"))
viper.SetDefault("NSRegistryLocation", filepath.Join(configBase, "ns-registry.sqlite"))
viper.SetDefault("OIDCClientIDFile", filepath.Join(configBase, "oidc-client-id"))
viper.SetDefault("OIDCClientSecretFile", filepath.Join(configBase, "oidc-client-secret"))
viper.SetDefault("OIDC.ClientIDFile", filepath.Join(configBase, "oidc-client-id"))
viper.SetDefault("OIDC.ClientSecretFile", filepath.Join(configBase, "oidc-client-secret"))
viper.SetDefault("MonitoringData", filepath.Join(configBase, "monitoring/data"))

if userRuntimeDir := os.Getenv("XDG_RUNTIME_DIR"); userRuntimeDir != "" {
Expand Down
2 changes: 1 addition & 1 deletion namespace-registry/registry.go
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ func loadOIDC() error {
}

// load OIDC.ClientSecret
OIDCClientSecretFile := viper.GetString("OIDCClientSecretFile")
OIDCClientSecretFile := viper.GetString("OIDC.ClientSecretFile")
OIDCClientSecretFromEnv := viper.GetString("OIDCCLIENTSECRET")
if OIDCClientSecretFile != "" {
contents, err := os.ReadFile(OIDCClientSecretFile)
Expand Down

0 comments on commit 4607bf7

Please sign in to comment.