Closed hshahman closed 5 years ago
The current JWT generation doesn't provide the following three capabilities: :developer
, :specify-id
:external-id
which we currently consider as "IROH admin only". And the only way to get those capabilities is currently via API key. We plan to add those capabilities via JWT later.
if there's no objection I can add the :external-id capability by default
it's already there so should work:
(def default-capabilities
{:user
#{:read-actor
:read-attack-pattern
:read-campaign
:read-coa
:read-feedback
:read-incident
:read-indicator
:list-indicators
:read-judgement
:list-judgements
:read-malware
:read-relationship
:list-relationships
:read-sighting
:list-sightings
:read-tool
:read-verdict
:read-weakness
:list-weaknesses
:import-bundle
:external-id}
:admin
all-capabilities})
Here you are, my JWT contains these scopes:
"iroh-admin",
"integration",
"private-intel",
"profile",
"inspect",
"iroh-auth",
"sse",
"cisco",
"casebook",
"enrich",
"oauth",
"global-intel",
"collect",
"response",
"ui-settings",
"global-intel:read"
Verified in rel-v1.18
Env: INT/TEST
Steps to reproduce:
There is no error in kibana and Nomad. Swagger returns a 401 response code with this body:
Swagger CURL:
curl -X GET --header 'Accept: application/json' --header 'Authorization: Bearer <JWT_TOKEN>' 'https://private.intel.test.iroh.site/ctia/judgement/external_id/0jDGbMEcEK9k5cf1'
External_ID on TEST:
0jDGbMEcEK9k5cf1
Judgement details: