Skip to content

Commit 167ec5e

Browse files
authored
fix(oauth): drop ungrantable JSM Forms scopes from Jira scope list (#4960)
* fix(oauth): drop ungrantable JSM Forms scopes from Jira scope list Atlassian never published read/write/delete:form:jira-service-management to the OAuth 2.0 (3LO) or Forge scope catalogs, so no OAuth app can be configured with them and the authorize flow silently omits them from every grant. Because the credential check hard-requires the full canonical list, every Jira credential showed a permanent 'Additional permissions required' banner that 'Update access' could never clear. No granted credential has ever held these scopes, and no saved workflow uses the JSM forms operations, so removal changes no working behavior. * fix(secrets): keep a fixed-length value mask for read-only viewers The viewer mask was derived from the value's length, but the server now withholds workspace secret values from non-admins (empty string), so the bullets disappeared entirely for read-only users. Always render a fixed-length mask for viewers — matching the component's documented behavior — which also stops leaking the secret's length.
1 parent 284edf0 commit 167ec5e

3 files changed

Lines changed: 8 additions & 7 deletions

File tree

apps/sim/app/workspace/[workspaceId]/settings/components/secrets/components/secret-value-field/secret-value-field.tsx

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,13 @@ import { ChipInput } from '@/components/emcn'
66

77
const BULLET = '\u2022'
88

9+
/**
10+
* Viewers always see this many bullets regardless of the real value, which the
11+
* server withholds (empty string) for non-admins. A fixed length also avoids
12+
* leaking the secret's length.
13+
*/
14+
const VIEWER_MASK_LENGTH = 10
15+
916
type SecretValueFieldProps = Omit<
1017
ComponentProps<'input'>,
1118
'type' | 'value' | 'onChange' | 'readOnly'
@@ -50,7 +57,7 @@ export function SecretValueField({
5057
const [focused, setFocused] = useState(false)
5158
const editable = canEdit && !readOnly
5259
const maskActive = canEdit && !unmasked && !focused
53-
const displayValue = canEdit ? value : value ? BULLET.repeat(value.length) : ''
60+
const displayValue = canEdit ? value : BULLET.repeat(VIEWER_MASK_LENGTH)
5461

5562
const mergedStyle: CSSProperties | undefined = maskActive
5663
? ({ ...style, WebkitTextSecurity: 'disc' } as CSSProperties)

apps/sim/lib/oauth/oauth.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -541,9 +541,6 @@ export const OAUTH_PROVIDERS: Record<string, OAuthProviderConfig> = {
541541
'write:request.participant:jira-service-management',
542542
'read:request.approval:jira-service-management',
543543
'write:request.approval:jira-service-management',
544-
'read:form:jira-service-management',
545-
'write:form:jira-service-management',
546-
'delete:form:jira-service-management',
547544
],
548545
},
549546
},

apps/sim/lib/oauth/utils.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -201,9 +201,6 @@ export const SCOPE_DESCRIPTIONS: Record<string, string> = {
201201
'Add and remove participants from customer requests',
202202
'read:request.approval:jira-service-management': 'View approvals on customer requests',
203203
'write:request.approval:jira-service-management': 'Approve or decline customer requests',
204-
'read:form:jira-service-management': 'View JSM forms and templates',
205-
'write:form:jira-service-management': 'Attach, save, and submit JSM forms',
206-
'delete:form:jira-service-management': 'Delete JSM forms',
207204

208205
// Microsoft scopes
209206
'User.Read': 'Read Microsoft user',

0 commit comments

Comments
 (0)