Skip to content

Commit b671c89

Browse files
committed
FE: Support awsRoleArn when using IAM Auth
1 parent 7f97f71 commit b671c89

File tree

3 files changed

+33
-7
lines changed

3 files changed

+33
-7
lines changed

frontend/src/widgets/ClusterConfigForm/Sections/Authentication/AuthenticationMethods.tsx

Lines changed: 26 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -76,12 +76,32 @@ const AuthenticationMethods: React.FC<{ method: string }> = ({ method }) => {
7676
);
7777
case 'SASL/AWS IAM':
7878
return (
79-
<Input
80-
label="AWS Profile Name"
81-
type="text"
82-
name="auth.props.awsProfileName"
83-
withError
84-
/>
79+
<>
80+
<Input
81+
label="AWS Profile Name"
82+
type="text"
83+
name="auth.props.awsProfileName"
84+
withError
85+
/>
86+
<Input
87+
label="AWS Role Arn"
88+
type="text"
89+
name="auth.props.awsRoleArn"
90+
withError
91+
/>
92+
<Input
93+
label="AWS Role Session Name"
94+
type="text"
95+
name="auth.props.awsRoleSessionName"
96+
withError
97+
/>
98+
<Input
99+
label="AWS STS Region"
100+
type="text"
101+
name="auth.props.awsStsRegion"
102+
withError
103+
/>
104+
</>
85105
);
86106
case 'mTLS':
87107
return <SSLForm prefix="auth.keystore" title="Keystore" />;

frontend/src/widgets/ClusterConfigForm/schema.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,10 @@ const authPropsSchema = lazy((_, { parent }) => {
141141
});
142142
case 'SASL/AWS IAM':
143143
return object({
144-
awsProfileName: string(),
144+
awsProfileName: string().notRequired(),
145+
awsRoleArn: string().notRequired(),
146+
awsRoleSessionName: string().notRequired(),
147+
awsStsRegion: string().notRequired(),
145148
});
146149
case 'SASL/Azure Entra':
147150
case 'SASL/GCP IAM':

frontend/src/widgets/ClusterConfigForm/utils/transformFormDataToPayload.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -260,6 +260,9 @@ export const transformFormDataToPayload = (data: ClusterConfigFormValues) => {
260260
'software.amazon.msk.auth.iam.IAMClientCallbackHandler',
261261
'sasl.jaas.config': getJaasConfig('SASL/AWS IAM', {
262262
awsProfileName: props.awsProfileName,
263+
awsRoleArn: props.awsRoleArn,
264+
awsRoleSessionName: props.awsRoleSessionName,
265+
awsStsRegion: props.awsStsRegion
263266
}),
264267
};
265268
break;

0 commit comments

Comments
 (0)