umccr / orcabus

 🐋 UMCCR Pipeline & Workflow Orchestration
3 stars 0 forks source link

Metadata docs #384

Closed alexiswl closed 2 months ago

alexiswl commented 3 months ago

From https://github.com/umccr/orcabus/blob/main/lib/workload/stateless/stacks/metadata-manager/README.md

curl -s -H "Authorization: Bearer $ORCABUS_TOKEN" "https://metadata.umccr.org/library" | jq

Should this be

curl -s -H "Authorization: Bearer $ORCABUS_TOKEN" "https://metadata.<account>.umccr.org/library" | jq

For me I needed to use

curl -s -H "Authorization: Bearer $ORCABUS_TOKEN" "https://metadata.dev.umccr.org/library" | jq
williamputraintan commented 3 months ago

Right will update explaining it better.

The example assume you need to query for prod data, as if you need to query from the app you would append the metadata with whatever value stored in SSM /hosted_zone/umccr/name which will be either dev.umccr.org, stg.umccr.org, or umccr.org.

alexiswl commented 3 months ago

Also

export ORCABUS_TOKEN=$(aws secretsmanager get-secret-value --secret-id orcabus/token-service-jwt --query 'SecretString' --output text | jq -r '.id_token')

Can be rewritten as

export ORCABUS_TOKEN=$(aws secretsmanager get-secret-value --secret-id orcabus/token-service-jwt --output json --query SecretString | jq -r 'fromjson | .id_token')