ワンクリックで
validate-connector-auth
Validate that credentials for the ADME OSDU connector authenticate successfully against the real ADME API.
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
メニュー
Validate that credentials for the ADME OSDU connector authenticate successfully against the real ADME API.
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
SOC 職業分類に基づく
Set up authentication for the ADME OSDU connector — get an Azure bearer token and write dev_config.json for live testing.
Mechanical audit of the ADME OSDU connector — implementation correctness, test coverage, artifacts completeness, and security. Produces a scored report.
Run the AdmeOsduLakeflowConnect pytest suite, diagnose failures, and fix the connector or simulator until everything passes. Branches on mode={simulate|live}.
Validate that ADME domain tables (wellbore, reservoir, rock_and_fluid) correctly implement CDC incremental sync — offset tracking, watermark filtering, and pagination termination.
| name | validate-connector-auth |
| description | Validate that credentials for the ADME OSDU connector authenticate successfully against the real ADME API. |
Confirm that a bearer token (or other credential) can reach the ADME sandbox and return data from at least one endpoint.
PYTHONPATH=.)CONNECTOR_TEST_CONFIG_JSON, CONNECTOR_TEST_CONFIG_PATH, or tests/unit/adme_osdu/dev_config.jsonhttps://admesbxscusins1.energy.azure.comcat tests/unit/adme_osdu/dev_config.json 2>/dev/null | python3 -c "import sys,json; d=json.load(sys.stdin); print('token length:', len(d.get('access_token','')))"
If missing, get one:
az login --tenant 72f988bf-86f1-41af-91ab-2d7cd011db47
TOKEN=$(az account get-access-token --resource "api://e37a6c70-7cbc-4593-80fc-01c1f20203f7" --tenant "72f988bf-86f1-41af-91ab-2d7cd011db47" --query accessToken -o tsv)
TOKEN=$(cat tests/unit/adme_osdu/dev_config.json | python3 -c "import sys,json; print(json.load(sys.stdin)['access_token'])")
curl -s -o /dev/null -w "%{http_code}" \
-H "Authorization: Bearer $TOKEN" \
-H "data-partition-id: opendes" \
"https://admesbxscusins1.energy.azure.com/api/entitlements/v2/groups"
Expected: 200. If 401 → token invalid or expired. If 403 → token valid but missing entitlements. If 000 → network not reachable.
import json, sys
sys.path.insert(0, '.')
sys.path.insert(0, 'tests/stubs')
with open('tests/unit/adme_osdu/dev_config.json') as f:
opts = json.load(f)
from connector.lakeflow.adme_osdu import AdmeOsduLakeflowConnect
c = AdmeOsduLakeflowConnect(opts)
# Snapshot table — quick, no pagination
recs, offset = c.read_table('entitlements', None, {})
groups = list(recs)
assert len(groups) > 0, "No groups returned — auth may be invalid"
assert offset is None, "Entitlements should return no offset (snapshot)"
print(f"✅ Auth valid — {len(groups)} entitlement groups returned")
| Check | Expected |
|---|---|
| HTTP status from entitlements endpoint | 200 |
| At least 1 group returned | ✅ |
data-partition-id header accepted | No 400 |
| Token expiry > 5 min | ✅ (warn if < 10 min) |
| Symptom | Cause | Fix |
|---|---|---|
401 Unauthorized | Token expired or wrong resource | Re-run az account get-access-token |
403 Forbidden | Token valid, missing users.datalake.ops@opendes.contoso.com group | Contact ADME admin |
AADSTS53003 | Conditional Access blocks local token | az login --tenant 72f988bf... interactively |
| Connection refused | Network restriction | Must have access to *.energy.azure.com |