Skip to content

Commit

Permalink
chore(phrases): update wording for rotate oidc signing keys (#4652)
Browse files Browse the repository at this point in the history
  • Loading branch information
charIeszhao authored Oct 16, 2023
1 parent 4ec15f2 commit 5665ed4
Show file tree
Hide file tree
Showing 16 changed files with 264 additions and 162 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ function SigningKeys() {
const api = useApi();
const { t } = useTranslation(undefined, { keyPrefix: 'admin_console.tenants.signing_keys' });
const [activeTab, setActiveTab] = useState<LogtoOidcConfigKey>(LogtoOidcConfigKey.PrivateKeys);
const keyType = activeTab === LogtoOidcConfigKey.PrivateKeys ? 'private-keys' : 'cookie-keys';
const entities = activeTab === LogtoOidcConfigKey.PrivateKeys ? 'tokens' : 'cookies';
const isPrivateKey = activeTab === LogtoOidcConfigKey.PrivateKeys;
const keyType = isPrivateKey ? 'private-keys' : 'cookie-keys';

const { data, error, mutate } = useSWR<OidcConfigKeysResponse[], RequestError>(
`api/configs/oidc/${keyType}`
Expand All @@ -55,13 +55,13 @@ function SigningKeys() {
dataIndex: 'status',
colSpan: 4,
render: (_: OidcConfigKeysResponse, rowIndex: number) => (
<Tag type="state" status={rowIndex === 0 ? 'success' : 'alert'}>
<Tag type="state" variant="plain" status={rowIndex === 0 ? 'success' : 'alert'}>
{t(rowIndex === 0 ? 'status.current' : 'status.previous')}
</Tag>
),
},
...condArray(
activeTab === LogtoOidcConfigKey.PrivateKeys && [
isPrivateKey && [
{
title: t('table_column.algorithm'),
dataIndex: 'signingKeyAlgorithm',
Expand Down Expand Up @@ -90,7 +90,7 @@ function SigningKeys() {
),
},
],
[activeTab, t]
[isPrivateKey, t]
);

return (
Expand All @@ -113,7 +113,7 @@ function SigningKeys() {
<DynamicT forKey="tenants.signing_keys.type.cookie_key" />
</TabNavItem>
</TabNav>
<FormField title="tenants.signing_keys.private_keys_in_use">
<FormField title={`tenants.signing_keys.${isPrivateKey ? 'private' : 'cookie'}_keys_in_use`}>
<Table
hasBorder
isLoading={isLoadingKeys || isRotating}
Expand All @@ -138,13 +138,13 @@ function SigningKeys() {
}
/>
</FormField>
<FormField title="tenants.signing_keys.rotate_private_keys">
<FormField title={`tenants.signing_keys.rotate_${isPrivateKey ? 'private' : 'cookie'}_keys`}>
<div className={styles.rotateKey}>
<div className={styles.description}>
{t('rotate_private_keys_description', { entities })}
{t(`rotate_${isPrivateKey ? 'private' : 'cookie'}_keys_description`)}
</div>
<Button
title="tenants.signing_keys.rotate_private_keys"
title={`tenants.signing_keys.rotate_${isPrivateKey ? 'private' : 'cookie'}_keys`}
type="default"
onClick={() => {
setShowRotateConfirmModal(true);
Expand Down Expand Up @@ -175,10 +175,10 @@ function SigningKeys() {
>
<span>
<Trans components={{ strong: <strong /> }}>
{t('reminder.rotate', { key: activeTab, entities })}
{t(`reminder.rotate_${isPrivateKey ? 'private' : 'cookie'}_key`)}
</Trans>
</span>
{activeTab === LogtoOidcConfigKey.PrivateKeys && (
{isPrivateKey && (
<FormField title="tenants.signing_keys.select_private_key_algorithm">
<Select
options={Object.values(SupportedSigningKeyAlgorithm).map((value) => ({
Expand Down Expand Up @@ -215,7 +215,7 @@ function SigningKeys() {
>
<span>
<Trans components={{ strong: <strong /> }}>
{t('reminder.delete', { key: activeTab, entities })}
{t(`reminder.delete_${isPrivateKey ? 'private' : 'cookie'}_key`)}
</Trans>
</span>
</DangerConfirmModal>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,12 +77,19 @@ const tenants = {
/** UNTRANSLATED */
private_keys_in_use: 'Private keys in use',
/** UNTRANSLATED */
cookie_keys_in_use: 'Cookie keys in use',
/** UNTRANSLATED */
rotate_private_keys: 'Rotate private keys',
/** UNTRANSLATED */
rotate_cookie_keys: 'Rotate cookie keys',
/** UNTRANSLATED */
rotate_private_keys_description:
'This will rotate the currently used private keys. Your {{entities}} with previous private keys will stay valid until you delete it.',
'This action will create a new private signing key, rotate the current key, and remove your previous key. Your JWT tokens signed with the current key will remain valid until deletion or another round of rotation.',
/** UNTRANSLATED */
select_private_key_algorithm: 'Select signing key algorithm for private keys',
rotate_cookie_keys_description:
'This action will create a new cookie key, rotate the current key, and remove your previous key. Your cookies with the current key will remain valid until deletion or another round of rotation.',
/** UNTRANSLATED */
select_private_key_algorithm: 'Select signing key algorithm for the new private key',
/** UNTRANSLATED */
rotate_button: 'Rotate',
table_column: {
Expand All @@ -101,17 +108,17 @@ const tenants = {
},
reminder: {
/** UNTRANSLATED */
rotate:
'Are you sure you want to rotate the <strong>{{key}}</strong>? This will require all your apps and APIs to use the new signing key. Existing {{entities}} stay valid until you rotate again.',
rotate_private_key:
'Are you sure you want to rotate the <strong>OIDC private keys</strong>? New issued JWT tokens will be signed by the new key. Existing JWT tokens stay valid until you rotate again.',
/** UNTRANSLATED */
delete:
'Are you sure you want to delete the <strong>{{key}}</strong>? Existing {{entities}} signed with this signing key will no longer be valid.',
},
signed_entity: {
rotate_cookie_key:
'Are you sure you want to rotate the <strong>OIDC cookie keys</strong>? New cookies generated in sign-in sessions will be signed by the new cookie key. Existing cookies stay valid until you rotate again.',
/** UNTRANSLATED */
tokens: 'JWT tokens',
delete_private_key:
'Are you sure you want to delete the <strong>OIDC private key</strong>? Existing JWT tokens signed with this private signing key will no longer be valid.',
/** UNTRANSLATED */
cookies: 'cookies',
delete_cookie_key:
'Are you sure you want to delete the <strong>OIDC cookie key</strong>? Older sign-in sessions with cookies signed with this cookie key will no longer be valid. A re-authentication is required for these users.',
},
},
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,10 +71,14 @@ const tenants = {
cookie_key: 'OIDC cookie keys',
},
private_keys_in_use: 'Private keys in use',
cookie_keys_in_use: 'Cookie keys in use',
rotate_private_keys: 'Rotate private keys',
rotate_cookie_keys: 'Rotate cookie keys',
rotate_private_keys_description:
'This will rotate the currently used private keys. Your {{entities}} with previous private keys will stay valid until you delete it.',
select_private_key_algorithm: 'Select signing key algorithm for private keys',
'This action will create a new private signing key, rotate the current key, and remove your previous key. Your JWT tokens signed with the current key will remain valid until deletion or another round of rotation.',
rotate_cookie_keys_description:
'This action will create a new cookie key, rotate the current key, and remove your previous key. Your cookies with the current key will remain valid until deletion or another round of rotation.',
select_private_key_algorithm: 'Select signing key algorithm for the new private key',
rotate_button: 'Rotate',
table_column: {
id: 'ID',
Expand All @@ -86,14 +90,14 @@ const tenants = {
previous: 'Previous',
},
reminder: {
rotate:
'Are you sure you want to rotate the <strong>{{key}}</strong>? This will require all your apps and APIs to use the new signing key. Existing {{entities}} stay valid until you rotate again.',
delete:
'Are you sure you want to delete the <strong>{{key}}</strong>? Existing {{entities}} signed with this signing key will no longer be valid.',
},
signed_entity: {
tokens: 'JWT tokens',
cookies: 'cookies',
rotate_private_key:
'Are you sure you want to rotate the <strong>OIDC private keys</strong>? New issued JWT tokens will be signed by the new key. Existing JWT tokens stay valid until you rotate again.',
rotate_cookie_key:
'Are you sure you want to rotate the <strong>OIDC cookie keys</strong>? New cookies generated in sign-in sessions will be signed by the new cookie key. Existing cookies stay valid until you rotate again.',
delete_private_key:
'Are you sure you want to delete the <strong>OIDC private key</strong>? Existing JWT tokens signed with this private signing key will no longer be valid.',
delete_cookie_key:
'Are you sure you want to delete the <strong>OIDC cookie key</strong>? Older sign-in sessions with cookies signed with this cookie key will no longer be valid. A re-authentication is required for these users.',
},
},
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,12 +77,19 @@ const tenants = {
/** UNTRANSLATED */
private_keys_in_use: 'Private keys in use',
/** UNTRANSLATED */
cookie_keys_in_use: 'Cookie keys in use',
/** UNTRANSLATED */
rotate_private_keys: 'Rotate private keys',
/** UNTRANSLATED */
rotate_cookie_keys: 'Rotate cookie keys',
/** UNTRANSLATED */
rotate_private_keys_description:
'This will rotate the currently used private keys. Your {{entities}} with previous private keys will stay valid until you delete it.',
'This action will create a new private signing key, rotate the current key, and remove your previous key. Your JWT tokens signed with the current key will remain valid until deletion or another round of rotation.',
/** UNTRANSLATED */
select_private_key_algorithm: 'Select signing key algorithm for private keys',
rotate_cookie_keys_description:
'This action will create a new cookie key, rotate the current key, and remove your previous key. Your cookies with the current key will remain valid until deletion or another round of rotation.',
/** UNTRANSLATED */
select_private_key_algorithm: 'Select signing key algorithm for the new private key',
/** UNTRANSLATED */
rotate_button: 'Rotate',
table_column: {
Expand All @@ -101,17 +108,17 @@ const tenants = {
},
reminder: {
/** UNTRANSLATED */
rotate:
'Are you sure you want to rotate the <strong>{{key}}</strong>? This will require all your apps and APIs to use the new signing key. Existing {{entities}} stay valid until you rotate again.',
rotate_private_key:
'Are you sure you want to rotate the <strong>OIDC private keys</strong>? New issued JWT tokens will be signed by the new key. Existing JWT tokens stay valid until you rotate again.',
/** UNTRANSLATED */
delete:
'Are you sure you want to delete the <strong>{{key}}</strong>? Existing {{entities}} signed with this signing key will no longer be valid.',
},
signed_entity: {
rotate_cookie_key:
'Are you sure you want to rotate the <strong>OIDC cookie keys</strong>? New cookies generated in sign-in sessions will be signed by the new cookie key. Existing cookies stay valid until you rotate again.',
/** UNTRANSLATED */
tokens: 'JWT tokens',
delete_private_key:
'Are you sure you want to delete the <strong>OIDC private key</strong>? Existing JWT tokens signed with this private signing key will no longer be valid.',
/** UNTRANSLATED */
cookies: 'cookies',
delete_cookie_key:
'Are you sure you want to delete the <strong>OIDC cookie key</strong>? Older sign-in sessions with cookies signed with this cookie key will no longer be valid. A re-authentication is required for these users.',
},
},
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,12 +77,19 @@ const tenants = {
/** UNTRANSLATED */
private_keys_in_use: 'Private keys in use',
/** UNTRANSLATED */
cookie_keys_in_use: 'Cookie keys in use',
/** UNTRANSLATED */
rotate_private_keys: 'Rotate private keys',
/** UNTRANSLATED */
rotate_cookie_keys: 'Rotate cookie keys',
/** UNTRANSLATED */
rotate_private_keys_description:
'This will rotate the currently used private keys. Your {{entities}} with previous private keys will stay valid until you delete it.',
'This action will create a new private signing key, rotate the current key, and remove your previous key. Your JWT tokens signed with the current key will remain valid until deletion or another round of rotation.',
/** UNTRANSLATED */
select_private_key_algorithm: 'Select signing key algorithm for private keys',
rotate_cookie_keys_description:
'This action will create a new cookie key, rotate the current key, and remove your previous key. Your cookies with the current key will remain valid until deletion or another round of rotation.',
/** UNTRANSLATED */
select_private_key_algorithm: 'Select signing key algorithm for the new private key',
/** UNTRANSLATED */
rotate_button: 'Rotate',
table_column: {
Expand All @@ -101,17 +108,17 @@ const tenants = {
},
reminder: {
/** UNTRANSLATED */
rotate:
'Are you sure you want to rotate the <strong>{{key}}</strong>? This will require all your apps and APIs to use the new signing key. Existing {{entities}} stay valid until you rotate again.',
rotate_private_key:
'Are you sure you want to rotate the <strong>OIDC private keys</strong>? New issued JWT tokens will be signed by the new key. Existing JWT tokens stay valid until you rotate again.',
/** UNTRANSLATED */
delete:
'Are you sure you want to delete the <strong>{{key}}</strong>? Existing {{entities}} signed with this signing key will no longer be valid.',
},
signed_entity: {
rotate_cookie_key:
'Are you sure you want to rotate the <strong>OIDC cookie keys</strong>? New cookies generated in sign-in sessions will be signed by the new cookie key. Existing cookies stay valid until you rotate again.',
/** UNTRANSLATED */
tokens: 'JWT tokens',
delete_private_key:
'Are you sure you want to delete the <strong>OIDC private key</strong>? Existing JWT tokens signed with this private signing key will no longer be valid.',
/** UNTRANSLATED */
cookies: 'cookies',
delete_cookie_key:
'Are you sure you want to delete the <strong>OIDC cookie key</strong>? Older sign-in sessions with cookies signed with this cookie key will no longer be valid. A re-authentication is required for these users.',
},
},
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,12 +78,19 @@ const tenants = {
/** UNTRANSLATED */
private_keys_in_use: 'Private keys in use',
/** UNTRANSLATED */
cookie_keys_in_use: 'Cookie keys in use',
/** UNTRANSLATED */
rotate_private_keys: 'Rotate private keys',
/** UNTRANSLATED */
rotate_cookie_keys: 'Rotate cookie keys',
/** UNTRANSLATED */
rotate_private_keys_description:
'This will rotate the currently used private keys. Your {{entities}} with previous private keys will stay valid until you delete it.',
'This action will create a new private signing key, rotate the current key, and remove your previous key. Your JWT tokens signed with the current key will remain valid until deletion or another round of rotation.',
/** UNTRANSLATED */
select_private_key_algorithm: 'Select signing key algorithm for private keys',
rotate_cookie_keys_description:
'This action will create a new cookie key, rotate the current key, and remove your previous key. Your cookies with the current key will remain valid until deletion or another round of rotation.',
/** UNTRANSLATED */
select_private_key_algorithm: 'Select signing key algorithm for the new private key',
/** UNTRANSLATED */
rotate_button: 'Rotate',
table_column: {
Expand All @@ -102,17 +109,17 @@ const tenants = {
},
reminder: {
/** UNTRANSLATED */
rotate:
'Are you sure you want to rotate the <strong>{{key}}</strong>? This will require all your apps and APIs to use the new signing key. Existing {{entities}} stay valid until you rotate again.',
rotate_private_key:
'Are you sure you want to rotate the <strong>OIDC private keys</strong>? New issued JWT tokens will be signed by the new key. Existing JWT tokens stay valid until you rotate again.',
/** UNTRANSLATED */
delete:
'Are you sure you want to delete the <strong>{{key}}</strong>? Existing {{entities}} signed with this signing key will no longer be valid.',
},
signed_entity: {
rotate_cookie_key:
'Are you sure you want to rotate the <strong>OIDC cookie keys</strong>? New cookies generated in sign-in sessions will be signed by the new cookie key. Existing cookies stay valid until you rotate again.',
/** UNTRANSLATED */
tokens: 'JWT tokens',
delete_private_key:
'Are you sure you want to delete the <strong>OIDC private key</strong>? Existing JWT tokens signed with this private signing key will no longer be valid.',
/** UNTRANSLATED */
cookies: 'cookies',
delete_cookie_key:
'Are you sure you want to delete the <strong>OIDC cookie key</strong>? Older sign-in sessions with cookies signed with this cookie key will no longer be valid. A re-authentication is required for these users.',
},
},
};
Expand Down
Loading

0 comments on commit 5665ed4

Please sign in to comment.