chore(m365powershell): manage encryption from plaintext password (#7784)

Co-authored-by: Daniel Barranquero <danielbo2001@gmail.com>
This commit is contained in:
Hugo Pereira Brito
2025-05-22 17:36:58 +02:00
committed by GitHub
co-authored by Daniel Barranquero
parent 99164ce93e
commit 36aaec8a55
21 changed files with 208 additions and 127 deletions
@@ -86,7 +86,7 @@ export const UpdateViaCredentialsForm = ({
client_secret: "",
tenant_id: "",
user: "",
encrypted_password: "",
password: "",
}
: providerType === "gcp"
? {
@@ -153,8 +153,8 @@ export const UpdateViaCredentialsForm = ({
message: errorMessage,
});
break;
case "/data/attributes/secret/encrypted_password":
form.setError("encrypted_password", {
case "/data/attributes/secret/password":
form.setError("password", {
type: "server",
message: errorMessage,
});
@@ -85,7 +85,7 @@ export const ViaCredentialsForm = ({
client_secret: "",
tenant_id: "",
user: "",
encrypted_password: "",
password: "",
}
: providerType === "gcp"
? {
@@ -152,8 +152,8 @@ export const ViaCredentialsForm = ({
message: errorMessage,
});
break;
case "/data/attributes/secret/encrypted_password":
form.setError("encrypted_password", {
case "/data/attributes/secret/password":
form.setError("password", {
type: "server",
message: errorMessage,
});
@@ -64,14 +64,14 @@ export const M365CredentialsForm = ({
/>
<CustomInput
control={control}
name="encrypted_password"
name="password"
type="password"
label="Encrypted Password"
label="Password"
labelPlacement="inside"
placeholder="Enter the Password"
variant="bordered"
isRequired
isInvalid={!!control._formState.errors.encrypted_password}
isInvalid={!!control._formState.errors.password}
/>
</>
);