Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions wren-ui/src/apollo/server/services/projectService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ const SENSITIVE_PROPERTY_NAME = new Set([
'privateKey',
'accessToken',
'clientSecret',
'webIdentityToken'
]);
export interface ProjectData {
displayName: string;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,9 @@ function AthenaOIDCFields(props: { isEditMode: boolean }) {
},
]}
>
<Input.TextArea
rows={3}
<Input.Password
placeholder="OAuth 2.0 access token or OpenID Connect ID token"
autoComplete="off"
/>
</Form.Item>

Expand Down
17 changes: 17 additions & 0 deletions wren-ui/src/hooks/useSetupConnectionDataSource.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,14 @@ export const transformFormToProperties = (
...properties,
...getDatabricksAuthentication(properties),
};
} else if (dataSourceType === DataSourceName.ATHENA) {
return {
...properties,
...getAthenaAuthentication(properties),
};
}


return {
...properties,
// remove password placeholder if user doesn't change the password
Expand Down Expand Up @@ -187,3 +193,14 @@ function getDatabricksAuthentication(properties: Record<string, any>) {
: properties?.accessToken,
};
}

function getAthenaAuthentication(properties: Record<string, any>) {
if (properties?.webIdentityToken) {
return {
webIdentityToken:
properties?.webIdentityToken === PASSWORD_PLACEHOLDER
? undefined
: properties?.webIdentityToken,
};
}
}