[blocker] Grant service account Assets Object Schema role on Stores schema (68) #1
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
The
webex-bot-fzjq885stnservice account currently has no role on the Assets Stores schema (id 68), so every AQL query returns HTTP 200 +total: 0. Jira Assets enforces schema-level role membership on top of OAuth scopes; the grantedread/write:cmdb-*:jirascopes are necessary but not sufficient.Fix: Jira → Assets → Object schemas → Stores (68) → Configure → Roles → add
webex-bot-fzjq885stn@serviceaccount.atlassian.comas Object Schema User (read + reference) or Developer (also allows creates/updates).Verification:
curl -s $HOST/api/wxccai/debug/assetsProbe?storeNumber=2000 | jq .diagnosisshould returnlikelyCause: "success"or"value_format_mismatch"— neverobject_type_forbiddenagain.Blocks #2.
Update from probe run on 2026-07-06: partial success — issue stays open.
What changed
The role grant did land.
GET /objectschema/listnow returns HTTP 200 (was silently returning empty / 403) and the service account can see 2 schemas:id=68 AE Asset Management (ASSET)id=1 Services (SVC)Why the AQL still fails for stores
The retail-store objects live in a different schema we still can't see.
Concrete proof: I searched project
SSfor tickets withcustomfield_10261populated and got 5 recent hits (SS-20873, SS-20871, SS-20870, SS-20869, SS-20868). Theircustomfield_10261values reference these Assets object ids:For every one of them:
GET /object/{id}→ HTTP 403"Sorry, you do not have permission to perform this action."objectId in (78558, 75857, 82200, 78585, 89079)unscoped → HTTP 200,total=0. Assets silently filters out objects in schemas the caller has no role on.Also relevant: the object type
id=109we've been configuring against doesn't exist in either visible schema (GET /objecttype/109→ 403), and the object type literally named "Store" in schema 68 (typeId=180, 1000 rows) turns out to hold Apple devices — iPhones/iPads with serials likeC00260K7MG, models likeiPad mini A17 Pro. Schema 68 is the device inventory schema, not the stores schema.Admin action needed
Grant the service account Object Schema Viewer on the schema that actually contains retail stores.
Easiest way to identify that schema without guessing:
Store Number = 514reference in the ticket..../browse/assets/{schemaId}/object/{objectId}— that{schemaId}is the one we need.webex-bot-fzjq885stn@serviceaccount.atlassian.comas Object Schema Viewer (same role that was granted on 68).Once the second grant lands
Rerun the probe. If it comes back green, we also need to update two env vars in
.envbefore closing:JIRA_ASSETS_STORE_SCHEMA_ID→ the newly-granted schema idJIRA_ASSETS_STORE_OBJECT_TYPE_ID→ the real store type id (currently109, which doesn't exist in this tenant — the probe will tell us the correct one)Then #2 (finalize
resolveStoreAssetReferenceto the winning AQL variant) can proceed.Update 2026-07-07: refined diagnosis after inspection from an admin account.
The previous comment guessed the retail-store schema was a different schema than 68. That was wrong — verified with curl from an account that has broader Assets visibility.
What we now know is true
The service account's
.envconfig has been correct all along:JIRA_ASSETS_STORE_SCHEMA_ID68(AE Asset Management)JIRA_ASSETS_STORE_OBJECT_TYPE_ID109(Store Address / Hierarchy)JIRA_ASSETS_STORE_NUMBER_ATTRIBUTEStore Number(attribute id635)"00514"(5-digit zero-padded)padStart(5, '0')✅Direct object fetch from an admin account:
And the exact AQL that
resolveStoreAssetReferencegenerates returns the object correctly from an admin account:So the code is done. No code change on our side is needed.
What's still blocking
Object type
109 Store Address / Hierarchyis inside schema 68, but the service account still gets 403 on bothGET /objecttype/109andGET /object/75857, and its AQL forobjectTypeId = 109 ...returnstotal=0. Yet the service account CAN run AQL against schema 68 broadly and CAN see other object types in it (Pillar, Components, Vendors, Category, etc.).That combination is only possible if:
Store Address / Hierarchyhas its own Configure → Permissions override that's stricter than schema 68's role, ORObject Schema Anonymous(very limited) orObject Schema Viewerwhen a per-type permission requiresObject Schema Useror higher.Another supporting data point:
GET /objectschema/68/objecttypesfrom the admin account returns only 10 top-level types (Pillar, Components, Vendor Contact Card, ComponentLink, Application, IT DR Tier, Vendors, POD, Category, ServerRole) andStore Address / Hierarchyis not in that list — which means type 109 is nested inside a folder/subgroup within the schema. Folders in Assets can carry their own permissions independently of the parent schema.Refined admin ask
In Jira → Assets → Object schemas → AE Asset Management (68):
109 Store Address / Hierarchy(it's nested — look inside the store/location folder or expand the tree). Right-click / open its Configure → Permissions panel. If it has any explicit permission override, either remove it, or addwebex-bot-fzjq885stn@serviceaccount.atlassian.com(and/or the group it belongs to) with read permission.Object Schema User(notAnonymous).Useris the minimum for reliable read access across all types in the schema.How to verify once done
The app has a diagnostic endpoint. Start the app locally (
npm start) and run:Expected:
likelyCause: "success"and thevariantsarray will showattr_name_padded(objectTypeId = 109 AND "Store Number" = "00514") withtotal=1. When that passes, this issue closes and #2 stays closed.