Flagsmith / Flagsmith/flagsmith-jira-integration
Replace user-scoped API tokens with organisation API keys
- Dominant language
- TypeScript
- Stars
- 1
- Forks
- 2
- Avg merge
- 1d 13h
- Merged PRs (30d)
- 8
Description
Currently, when configuring the JIRA integration, Flagsmith users must use their own user token (obtained from their account settings). We'd like to update the integration so that they can use Organisation API Keys instead.
In order to do this, since the prefix in the `Authorization` header is different depending on the type of token, we'll likely need to consider how we make the change backwards compatible.
Based on the properties of the keys, it looks like we could do something like:
```python
org_api_key_matcher = re.compile("[A-Za-z0-9]{8}\.[A-Za-z0-9]{32}")
if org_api_key_matcher.match(auth_token):
header_prefix = "Api-Key"
else:
header_prefix = "Token"
```
Contributor guide
Research direction
Start by locating the JIRA integration's configuration and the code that constructs the Authorization header. Check how existing user tokens are sent, then verify both user-token and organisation-key formats against the expected prefixes. Done means organisation API keys work while existing user tokens remain backwards compatible.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- api, backend
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100