refactor: [OCSRE-1629] keep only the global NATS credentials variables
Remove the service-specific NATS credentials variables. Only OCIS_NATS_CREDS_FILE and OCIS_NATS_CREDS remain. The service registry also uses these two variables and no longer reads MICRO_REGISTRY_AUTH_CREDS_FILE and MICRO_REGISTRY_AUTH_CREDS. Remove the envdecode logic that let the more specific scope win, because only one scope remains. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
1 parent
f04062e6bd
commit
5b7d19de45
32 files changed
+78
-279
No files matched your search
@@ -45,8 +45,8 @@ type Events struct {
|
||||
EnableTLS bool `yaml:"enable_tls" env:"OCIS_EVENTS_ENABLE_TLS;POSTPROCESSING_EVENTS_ENABLE_TLS" desc:"Enable TLS for the connection to the events broker. The events broker is the ocis service which receives and delivers events between the services." introductionVersion:"pre5.0"`
|
||||
AuthUsername string `yaml:"username" env:"OCIS_EVENTS_AUTH_USERNAME;POSTPROCESSING_EVENTS_AUTH_USERNAME" desc:"The username to authenticate with the events broker. The events broker is the ocis service which receives and delivers events between the services." introductionVersion:"5.0"`
|
||||
AuthPassword string `yaml:"password" env:"OCIS_EVENTS_AUTH_PASSWORD;POSTPROCESSING_EVENTS_AUTH_PASSWORD" desc:"The password to authenticate with the events broker. The events broker is the ocis service which receives and delivers events between the services." introductionVersion:"5.0"`
|
||||
CredsFile string `yaml:"creds_file" env:"OCIS_NATS_CREDS_FILE;POSTPROCESSING_EVENTS_CREDS_FILE" desc:"Path to a NATS .creds file with a user JWT and an NKey seed. Use it to authenticate with the events broker when NATS runs in JWT (operator) mode. When set, the username and the password are not used. The file is read again on each reconnect." introductionVersion:"8.3.0"`
|
||||
Creds string `mask:"password" yaml:"creds" env:"OCIS_NATS_CREDS;POSTPROCESSING_EVENTS_CREDS" desc:"Content of a NATS .creds file with a user JWT and an NKey seed. Use it to authenticate with the events broker when NATS runs in JWT (operator) mode. A service-specific variable takes precedence over a global variable. In the same scope, the content takes precedence over the path of a .creds file. When set, the username and the password are not used." introductionVersion:"8.3.0"`
|
||||
CredsFile string `yaml:"creds_file" env:"OCIS_NATS_CREDS_FILE" desc:"Path to a NATS .creds file with a user JWT and an NKey seed. Use it to authenticate with the events broker when NATS runs in JWT (operator) mode. When set, the username and the password are not used. The file is read again on each reconnect." introductionVersion:"8.3.0"`
|
||||
Creds string `mask:"password" yaml:"creds" env:"OCIS_NATS_CREDS" desc:"Content of a NATS .creds file with a user JWT and an NKey seed. Use it to authenticate with the events broker when NATS runs in JWT (operator) mode. The content takes precedence over the path of a .creds file. When set, the username and the password are not used." introductionVersion:"8.3.0"`
|
||||
}
|
||||
|
||||
// Debug defines the available debug configuration.
|
||||
@@ -66,8 +66,8 @@ type Store struct {
|
||||
TTL time.Duration `yaml:"ttl" env:"OCIS_PERSISTENT_STORE_TTL;POSTPROCESSING_STORE_TTL" desc:"Time to live for events in the store. See the Environment Variable Types description for more details." introductionVersion:"pre5.0"`
|
||||
AuthUsername string `yaml:"username" env:"OCIS_PERSISTENT_STORE_AUTH_USERNAME;POSTPROCESSING_STORE_AUTH_USERNAME" desc:"The username to authenticate with the store. Only applies when store type 'nats-js-kv' is configured." introductionVersion:"5.0"`
|
||||
AuthPassword string `yaml:"password" env:"OCIS_PERSISTENT_STORE_AUTH_PASSWORD;POSTPROCESSING_STORE_AUTH_PASSWORD" desc:"The password to authenticate with the store. Only applies when store type 'nats-js-kv' is configured." introductionVersion:"5.0"`
|
||||
CredsFile string `yaml:"creds_file" env:"OCIS_NATS_CREDS_FILE;POSTPROCESSING_STORE_CREDS_FILE" desc:"Path to a NATS .creds file with a user JWT and an NKey seed. Use it to authenticate with the store when NATS runs in JWT (operator) mode. When set, the username and the password are not used. The file is read again on each reconnect. Only applies when store type 'nats-js-kv' is configured." introductionVersion:"8.3.0"`
|
||||
Creds string `mask:"password" yaml:"creds" env:"OCIS_NATS_CREDS;POSTPROCESSING_STORE_CREDS" desc:"Content of a NATS .creds file with a user JWT and an NKey seed. Use it to authenticate with the store when NATS runs in JWT (operator) mode. A service-specific variable takes precedence over a global variable. In the same scope, the content takes precedence over the path of a .creds file. When set, the username and the password are not used. Only applies when store type 'nats-js-kv' is configured." introductionVersion:"8.3.0"`
|
||||
CredsFile string `yaml:"creds_file" env:"OCIS_NATS_CREDS_FILE" desc:"Path to a NATS .creds file with a user JWT and an NKey seed. Use it to authenticate with the store when NATS runs in JWT (operator) mode. When set, the username and the password are not used. The file is read again on each reconnect. Only applies when store type 'nats-js-kv' is configured." introductionVersion:"8.3.0"`
|
||||
Creds string `mask:"password" yaml:"creds" env:"OCIS_NATS_CREDS" desc:"Content of a NATS .creds file with a user JWT and an NKey seed. Use it to authenticate with the store when NATS runs in JWT (operator) mode. The content takes precedence over the path of a .creds file. When set, the username and the password are not used. Only applies when store type 'nats-js-kv' is configured." introductionVersion:"8.3.0"`
|
||||
EnableTLS bool `yaml:"enable_tls" env:"OCIS_PERSISTENT_STORE_ENABLE_TLS;POSTPROCESSING_STORE_ENABLE_TLS" desc:"Activate TLS for the connection to the store. Only applies when store type 'nats-js-kv' is configured." introductionVersion:"8.3.0"`
|
||||
TLSInsecure bool `yaml:"tls_insecure" env:"OCIS_PERSISTENT_STORE_TLS_INSECURE;POSTPROCESSING_STORE_TLS_INSECURE" desc:"Disable TLS certificate verification for the store connection. Only applies when store type 'nats-js-kv' is configured." introductionVersion:"8.3.0"`
|
||||
TLSRootCACertificate string `yaml:"tls_root_ca_certificate" env:"OCIS_PERSISTENT_STORE_TLS_ROOT_CA_CERTIFICATE;POSTPROCESSING_STORE_TLS_ROOT_CA_CERTIFICATE" desc:"Path to the PEM-encoded root CA certificate for the store TLS connection. Only applies when store type 'nats-js-kv' is configured." introductionVersion:"8.3.0"`
|
||||
|
||||
Reference in new issue
Block a user