sparse-intern-71089
02/09/2024, 11:10 AMgentle-application-59272
02/13/2024, 8:17 AMprehistoric-fish-76119
02/13/2024, 9:53 AMhashedPassword
it's bcrypted password, it changed every run.
I have:
const hashedPassword = bcrypt.hashSync(password, 10);
I want to trigger secret update only in case of password
changed, not hashedPassword
.
Probably there could be a way to save some checksum based on password.gentle-application-59272
02/13/2024, 10:46 AMgentle-application-59272
02/13/2024, 11:05 AMconst salt = new random.RandomString("random", {
length: 22,
special: false,
keepers: {
password
}
});
const hash = salt.apply(salt => bcrypt.hashSync(password, `$2a$10$${salt}`))
gentle-application-59272
02/13/2024, 11:05 AMgentle-application-59272
02/13/2024, 11:05 AMprehistoric-fish-76119
02/13/2024, 11:52 AMgentle-application-59272
02/13/2024, 11:55 AMimport { interpolate } from '@pulumi/pulumi';
...
stringData: {
auth: interpolate`${httpUsername}:${hash}`,
},
prehistoric-fish-76119
02/13/2024, 11:56 AM$2a$10$
?gentle-application-59272
02/13/2024, 11:57 AMgentle-application-59272
02/13/2024, 11:57 AMhashSync
function failsprehistoric-fish-76119
02/13/2024, 12:05 PMsalt.result.apply
.