Skip to content

Conversation

@bornast
Copy link
Member

@bornast bornast commented Dec 5, 2025

This PR copies the password component into the v2 folder and adds integration tests for it.

@bornast bornast added the enhancement New feature or request label Dec 5, 2025
program: () => import('./infrastructure'),
};

describe('Password component deployment', () => {
Copy link
Contributor

Choose a reason for hiding this comment

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

Not sure if we'll be able to test this, but it is worth to investigate - is the password value masked in the output of the Pulumi program?

Note: it should be due to additionalSecretOutputs option sent to the super, but having that test would be beneficial to capture potential leaks.

Copy link
Member Author

Choose a reason for hiding this comment

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

I've done some investigation and seems like additionalSecretOutputs isn't even working for custom components as it states in the docs.
I had to wrap the value in pulumi.secret() which behaves the same as output except the returned output is marked as containing sensitive data.
I also implemented a test to verify that the password is treated as a secret. To make that test work, I had to export the password output directly from the infrastructure index file. The reason is that the automation api unwraps values, and for objects it only keeps the secret flag at the top level. Because of that, there’s no reliable way to check whether nested properties are secrets once they’re unwrapped.

@bornast bornast added the Don't merge Do not merge this PR label Dec 15, 2025
@bornast bornast removed the Don't merge Do not merge this PR label Dec 16, 2025
@bornast bornast requested a review from mandryllo December 16, 2025 12:23
Copy link
Collaborator

@mandryllo mandryllo left a comment

Choose a reason for hiding this comment

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

LGTM

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.

4 participants