Skip to content

Convert mongoshrc.js template to EPP#790

Merged
kenyon merged 3 commits intovoxpupuli:masterfrom
kenyon:simplify-sensitive-handling
Mar 1, 2026
Merged

Convert mongoshrc.js template to EPP#790
kenyon merged 3 commits intovoxpupuli:masterfrom
kenyon:simplify-sensitive-handling

Conversation

@kenyon
Copy link
Copy Markdown
Member

@kenyon kenyon commented Feb 27, 2026

  • server: remove unnecessary $admin_password_unsensitive logic
  • db: remove unnecessary sensitive string unwrap logic
  • server/config: convert mongoshrc.js template to EPP

@kenyon kenyon changed the title Convert mongorc.js template to EPP Convert mongorc.js template to EPP Feb 27, 2026
@kenyon kenyon marked this pull request as draft February 27, 2026 21:29
Unwrapping a plain string just returns the string, so no need to check
if it's sensitive.
Unwrapping a plain string just returns the string, so no need to check
if it's sensitive.
@kenyon kenyon changed the title Convert mongorc.js template to EPP Convert mongoshrc.js template to EPP Feb 27, 2026
@kenyon kenyon force-pushed the simplify-sensitive-handling branch from 5cf15b5 to 5383c11 Compare February 27, 2026 21:43
@kenyon kenyon force-pushed the simplify-sensitive-handling branch from 5383c11 to ca4080b Compare February 27, 2026 21:51
@kenyon kenyon marked this pull request as ready for review February 27, 2026 21:57
@kenyon kenyon linked an issue Feb 28, 2026 that may be closed by this pull request
@bastelfreak bastelfreak added the bug Something isn't working label Mar 1, 2026
@bastelfreak bastelfreak added enhancement New feature or request and removed bug Something isn't working labels Mar 1, 2026
@kenyon kenyon merged commit bbd5b76 into voxpupuli:master Mar 1, 2026
37 checks passed
Comment thread manifests/server.pp
user => $admin_username,
auth_mechanism => $admin_auth_mechanism,
password => $admin_password_unsensitive,
password => $admin_password.unwrap,
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why unwrap here, although mongodb::db accepts Sensitive?

unwrap should be the absolute Exception!

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because I was just removing the unnecessary unwrap logic above. We could push the unwrap into mongodb::db, looks like that would be equivalent. Looks like it still needs to be unwrapped for use in mongodb_user. @cocker-cc do you want to provide a PR?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Handle sensitive data in mongoshrc.js template

3 participants