Skip to content

fix: honor configured broker manager credential (#42)#45

Merged
craigpnnl merged 2 commits into
developfrom
fix/gadp014-configurable-broker-credential
Jul 10, 2026
Merged

fix: honor configured broker manager credential (#42)#45
craigpnnl merged 2 commits into
developfrom
fix/gadp014-configurable-broker-credential

Conversation

@craigpnnl

Copy link
Copy Markdown
Contributor

Problem

The broker system credential was not configurable. GridOpticsServer read goss.system.manager and goss.system.manager.password via getProperty() but discarded the results, always connecting to the ActiveMQ broker with hardcoded system/manager. Any operator who set those properties was silently ignored.

Fix

  • Store the configured credential and use it at createConnection().
  • Absent or empty config falls back to system/manager via shared DEFAULT_SYSTEM_MANAGER_USER/DEFAULT_SYSTEM_MANAGER_PASSWORD constants, so deployments that never set these properties are unchanged.
  • Connect-failure log raised from debug to warn so a bad configured credential is visible.
  • Correct a latent typo in the runner config: goss.system.manager.password = managera to manager, which matches the realm account (system=manager). This was harmless while the credential was hardcoded, but would break broker auth once the config is honored. Verified against pnnl.goss.core.security.propertyfile.cfg, GossAuthorizingRealm, and SystemBasedRealm.

Behavior change

A deployment that set goss.system.manager[.password] (previously ignored) now has those values take effect. Deployments that never set them are unaffected.

Testing

GridOpticsServerBrokerCredentialTest: configured-honored, default-when-absent, default-when-empty. ./gradlew :pnnl.goss.core:build green.

Reviews

Reviewed for code quality, security (no credential logging, fails closed, typo re-syncs both sides off one config key), and failure handling.

Related

Closes #42. Tracking #40.

…system/manager

GridOpticsServer read goss.system.manager and goss.system.manager.password
via getProperty() but discarded the results, always connecting to the broker
as the hardcoded system/manager. The configured credential is now stored and
used at createConnection(). Absent or empty config falls back to system/manager
via shared DEFAULT_SYSTEM_MANAGER_USER/PASSWORD constants, so deployments that
never set these properties are unchanged. Connect-failure log raised to warn so
a bad configured credential is visible without debug logging.

Behavior change: a deployment that set these properties (previously ignored)
now has them take effect. Tests cover configured-honored, default-when-absent,
and default-when-empty.
…to manager)

pnnl.goss.core.server.cfg had goss.system.manager.password = managera, which
did not match the realm account (system=manager). This was masked while the
server hardcoded the credential; once the server honors the configured value,
the typo would break broker auth. Verified manager against the realm account
in propertyfile.cfg, GossAuthorizingRealm, and SystemBasedRealm.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant