@postman-cse/onboarding-gcp-spec-discovery 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +181 -0
- package/RELEASE_POLICY.md +43 -0
- package/SECURITY.md +32 -0
- package/SUPPORT.md +30 -0
- package/action.yml +98 -0
- package/dist/cli.cjs +48807 -0
- package/dist/index.cjs +51275 -0
- package/docs/LIVE_TESTING_RUNBOOK.md +41 -0
- package/docs/PRD.md +223 -0
- package/docs/providers.md +117 -0
- package/docs/repository-association.md +70 -0
- package/package.json +70 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Postman, Inc.
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,181 @@
|
|
|
1
|
+
# Postman Onboarding: GCP Spec Discovery
|
|
2
|
+
|
|
3
|
+
[](https://github.com/postman-cs/postman-gcp-spec-discovery-action/actions/workflows/ci.yml) [](https://github.com/postman-cs/postman-gcp-spec-discovery-action/releases) [](https://www.npmjs.com/package/@postman-cse/onboarding-gcp-spec-discovery) [](LICENSE)
|
|
4
|
+
|
|
5
|
+
Discover and export OpenAPI specifications from GCP services for Postman onboarding. The action uses repository context and Google Cloud credentials to select an existing specification or export one from a supported GCP provider.
|
|
6
|
+
|
|
7
|
+
## Authentication
|
|
8
|
+
|
|
9
|
+
Authenticate with Application Default Credentials (ADC) or Workload Identity Federation. In GitHub Actions, use [`google-github-actions/auth`](https://github.com/google-github-actions/auth) before this action. `project-id` is required; `location` defaults to `global`.
|
|
10
|
+
|
|
11
|
+
```yaml
|
|
12
|
+
jobs:
|
|
13
|
+
discover:
|
|
14
|
+
runs-on: ubuntu-latest
|
|
15
|
+
permissions:
|
|
16
|
+
contents: read
|
|
17
|
+
id-token: write
|
|
18
|
+
steps:
|
|
19
|
+
- uses: actions/checkout@v4
|
|
20
|
+
- uses: google-github-actions/auth@v2
|
|
21
|
+
with:
|
|
22
|
+
workload_identity_provider: ${{ secrets.GCP_WORKLOAD_IDENTITY_PROVIDER }}
|
|
23
|
+
service_account: ${{ secrets.GCP_SERVICE_ACCOUNT }}
|
|
24
|
+
- id: spec
|
|
25
|
+
uses: postman-cs/postman-gcp-spec-discovery-action@v1
|
|
26
|
+
with:
|
|
27
|
+
project-id: my-gcp-project
|
|
28
|
+
- run: echo "Resolved ${{ steps.spec.outputs.source-type }} -> ${{ steps.spec.outputs.spec-path }}"
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
## Usage
|
|
32
|
+
|
|
33
|
+
### Resolve one service
|
|
34
|
+
|
|
35
|
+
```yaml
|
|
36
|
+
- id: spec
|
|
37
|
+
uses: postman-cs/postman-gcp-spec-discovery-action@v1
|
|
38
|
+
with:
|
|
39
|
+
project-id: my-gcp-project
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
### Discover automatically from the gateway (repository association)
|
|
43
|
+
|
|
44
|
+
Label the deployed GCP resource that owns this repository's API with `postman-repo=<owner--repo>` (canonicalized slug: lowercase, `/` folded to `--`, invalid characters folded to `-`; for `github.com/acme/payments-api` the value is `acme--payments-api`). The action then resolves the right API from repository identity alone — no `api-id`, no service-name hints:
|
|
45
|
+
|
|
46
|
+
```yaml
|
|
47
|
+
- id: spec
|
|
48
|
+
uses: postman-cs/postman-gcp-spec-discovery-action@v1
|
|
49
|
+
with:
|
|
50
|
+
project-id: my-gcp-project
|
|
51
|
+
# repo-slug defaults to the CI-detected repository (GITHUB_REPOSITORY);
|
|
52
|
+
# set it only to resolve on behalf of a different repository.
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
Exactly one conflict-free exact label match auto-selects. Zero matches, multiple matches, or colliding label values stay `unresolved` (`manual-review`) with the expected label value printed in the evidence — the action never guesses. Colliding repositories (same canonical value, e.g. case-fold or punctuation collisions, or slugs longer than 63 characters) must set `api-id` or `expected-api-ids-json` explicitly.
|
|
56
|
+
|
|
57
|
+
`postman-repo` is an owner assertion, not a verified binding: anyone with `*.update` on the resource can point it at any repository. Keep IAM label-write privileges scoped to the deployment pipeline; ambiguity still always forces `manual-review`.
|
|
58
|
+
|
|
59
|
+
A ready-to-distribute per-service-repo workflow using this pattern (adapted from the Fox AWS discovery hub, but hub-less — each repo discovers its own spec) ships in [`templates/postman-gcp-onboard.yml`](templates/postman-gcp-onboard.yml). See [docs/repository-association.md](docs/repository-association.md) for marker placement per provider, ambiguity semantics, and WIF bootstrap.
|
|
60
|
+
|
|
61
|
+
### Resolve a known config or Apigee proxy revision
|
|
62
|
+
|
|
63
|
+
```yaml
|
|
64
|
+
- uses: postman-cs/postman-gcp-spec-discovery-action@v1
|
|
65
|
+
with:
|
|
66
|
+
project-id: my-gcp-project
|
|
67
|
+
api-id: projects/my-gcp-project/locations/global/apis/payments/configs/v1
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
### Export every candidate
|
|
71
|
+
|
|
72
|
+
```yaml
|
|
73
|
+
- uses: postman-cs/postman-gcp-spec-discovery-action@v1
|
|
74
|
+
with:
|
|
75
|
+
project-id: my-gcp-project
|
|
76
|
+
mode: discover-many
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
### Portable CLI
|
|
80
|
+
|
|
81
|
+
```sh
|
|
82
|
+
npx @postman-cse/onboarding-gcp-spec-discovery \
|
|
83
|
+
--project-id "$GCP_PROJECT_ID" \
|
|
84
|
+
--result-json postman-gcp-spec-discovery-result.json \
|
|
85
|
+
--dotenv-path gcp-spec.env
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
## Inputs
|
|
89
|
+
|
|
90
|
+
<!-- inputs-table:start -->
|
|
91
|
+
| Name | Description | Required | Default |
|
|
92
|
+
| --- | --- | --- | --- |
|
|
93
|
+
| `mode` | Discovery mode: resolve-one selects the single best service for this repository; discover-many exports every exportable candidate. | no | `resolve-one` |
|
|
94
|
+
| `project-id` | Google Cloud project ID used as the exact discovery and credential preflight scope. | yes | n/a |
|
|
95
|
+
| `location` | Google Cloud API Gateway location. v1 supports global. | no | `global` |
|
|
96
|
+
| `api-id` | Optional full API Gateway config, Cloud Endpoints config, Apigee proxy revision, API Hub spec, Apigee portal apidoc, Vertex extension, Dialogflow tool, or CES tool/toolset resource name. Use this to bypass broader project discovery. | no | n/a |
|
|
97
|
+
| `repo-slug` | Repository slug (owner/name) used for repository-association matching against postman-repo resource labels. Defaults to the CI-detected repository (GITHUB_REPOSITORY). | no | n/a |
|
|
98
|
+
| `expected-service-name` | Optional expected service name used as a ranking hint and as the reported service name when resolution stays manual-review. | no | n/a |
|
|
99
|
+
| `expected-api-ids-json` | Optional JSON array of full resource names that this repository expects to own; exact matches rank highest during resolution. | no | `[]` |
|
|
100
|
+
| `service-mapping-json` | Optional JSON object mapping resource names to service names, used to name exported specs for label-incapable providers. | no | `{}` |
|
|
101
|
+
| `output-dir` | Directory under the repository root where generated specs are written. | no | `discovered-specs` |
|
|
102
|
+
| `postman-api-key` | Optional service-account PMAK used to mint or re-mint a postman-access-token for telemetry enrichment (account_type). Not used for any GCP or Postman asset operation. | no | n/a |
|
|
103
|
+
| `postman-access-token` | Optional Postman service-account access token, used only to enrich anonymous telemetry with the session account_type. When omitted, postman-api-key alone can mint one for the same purpose. Not used for any GCP or Postman asset operation. | no | n/a |
|
|
104
|
+
<!-- inputs-table:end -->
|
|
105
|
+
|
|
106
|
+
## Outputs
|
|
107
|
+
|
|
108
|
+
<!-- outputs-table:start -->
|
|
109
|
+
| Name | Description |
|
|
110
|
+
| --- | --- |
|
|
111
|
+
| `resolution-json` | JSON resolution result describing status, source type, confidence, and evidence. |
|
|
112
|
+
| `resolution-status` | Resolution status: resolved or unresolved. |
|
|
113
|
+
| `source-type` | Resolved source type: repo-spec, api-gateway-config, cloud-endpoints-config, apigee-proxy, apigee-env-oas, api-hub-spec, app-integration-trigger, connectors-custom-spec, connectors-generated-spec, apigee-portal-doc, vertex-extension-manifest, agent-engine-generated-spec, dialogflow-tool-schema, ces-tool-schema, ces-toolset-schema, iac-embedded, manual-review, or discover-many. |
|
|
114
|
+
| `mapping-confidence` | Numeric confidence score for the selected service candidate. |
|
|
115
|
+
| `spec-path` | Path to the resolved or generated specification when available. |
|
|
116
|
+
| `api-id` | Full resource name of the exported cloud source (API Gateway config, Cloud Endpoints config, Apigee proxy revision, API Hub spec, Apigee portal apidoc, Vertex extension, Agent Engine, Dialogflow tool, or CES tool/toolset); empty for repo, generated, or IaC-local resolutions. |
|
|
117
|
+
| `service-name` | Resolved service name. |
|
|
118
|
+
| `services-json` | discover-many output: JSON array of exported services. |
|
|
119
|
+
| `service-count` | discover-many output: number of exported services. |
|
|
120
|
+
| `export-summary-json` | JSON summary of attempted, exported, failed, and skipped candidates. |
|
|
121
|
+
| `candidates-json` | Ranked ambiguous candidates as JSON when resolution is unresolved with at least two candidates; empty otherwise. |
|
|
122
|
+
| `provider-type` | Provider that produced the resolved spec: api-gateway, cloud-endpoints, apigee, api-hub, app-integration, connectors-custom, apigee-portal, vertex-extensions, agent-engines, dialogflow-tools, ces-toolsets, or iac-local. |
|
|
123
|
+
| `spec-format` | Format of the resolved spec: openapi-yaml or openapi-json. |
|
|
124
|
+
| `contract-origin` | Compatibility output; always empty in v1. |
|
|
125
|
+
| `contract-metadata-path` | Compatibility output; always empty in v1. |
|
|
126
|
+
| `variant-count` | Compatibility output; always empty in v1. |
|
|
127
|
+
| `derived-openapi-path` | Path to the derived OpenAPI 3.x document when the source was not already OpenAPI 3.x. |
|
|
128
|
+
| `derived-openapi-version` | OpenAPI version of the derived document: 3.0.3 or 3.1.0. |
|
|
129
|
+
| `derived-openapi-completeness` | Whether the derived OpenAPI document is full or partial. |
|
|
130
|
+
| `derived-openapi-format` | Serialization format of the derived OpenAPI document: openapi-json. |
|
|
131
|
+
| `derived-openapi-evidence-json` | JSON array of evidence strings describing how the derived OpenAPI document was produced. |
|
|
132
|
+
| `narrowing-strategy` | Narrowing tier that produced the candidate ordering: iac-fingerprint, project-correlation, label-prefilter, naming-heuristic, or none. |
|
|
133
|
+
<!-- outputs-table:end -->
|
|
134
|
+
|
|
135
|
+
## Supported providers
|
|
136
|
+
|
|
137
|
+
| Provider | Source type | Exported format |
|
|
138
|
+
| --- | --- | --- |
|
|
139
|
+
| `api-gateway` | `api-gateway-config` | OpenAPI from the full API Gateway config `openapiDocuments` payload |
|
|
140
|
+
| `cloud-endpoints` | `cloud-endpoints-config` | OpenAPI from Cloud Endpoints `sourceInfo` `OPEN_API_*` sources |
|
|
141
|
+
| `apigee` | `apigee-proxy` | OpenAPI found in an Apigee proxy revision zip under `resources/oas` or `resources/openapi` |
|
|
142
|
+
| `api-hub` | `api-hub-spec` | Verbatim OpenAPI stored in Apigee API Hub, exported via `specs:contents` (manually registered or ingested from Apigee / API Gateway plugins) |
|
|
143
|
+
| `app-integration` | `app-integration-trigger` | OpenAPI 3.0 generated server-side by Application Integration `generateOpenApiSpec` for published integrations with API triggers |
|
|
144
|
+
| `connectors-custom` | `connectors-custom-spec` | The OpenAPI document a custom Integration Connector was built from, fetched from its recorded `gs://` `specLocation` |
|
|
145
|
+
| `apigee-portal` | `apigee-portal-doc` | Original OpenAPI documentation published through an Apigee portal API document |
|
|
146
|
+
| `vertex-extensions` | `vertex-extension-manifest` | Inline or Cloud Storage OpenAPI from a Vertex AI extension manifest |
|
|
147
|
+
| `agent-engines` | `agent-engine-generated-spec` | OpenAPI assembled from Vertex AI Agent Engine classMethods declarations |
|
|
148
|
+
| `dialogflow-tools` | `dialogflow-tool-schema` | Original OpenAPI text schema stored on a Dialogflow CX tool |
|
|
149
|
+
| `ces-toolsets` | `ces-toolset-schema` | Original OpenAPI schema stored on a Conversational Agents app toolset |
|
|
150
|
+
| `iac-local` | `iac-embedded` / path reference | OpenAPI referenced by local Terraform `google_api_gateway_api_config` or `google_endpoints_service` resources |
|
|
151
|
+
|
|
152
|
+
The resolver probes providers in this order: `api-gateway`, `cloud-endpoints`, `apigee`, `api-hub`, `app-integration`, `connectors-custom`, `apigee-portal`, `vertex-extensions`, `agent-engines`, `dialogflow-tools`, `ces-toolsets`, `iac-local`. A committed `repo-spec` wins before remote discovery. Candidates are narrowed by `iac-fingerprint`, `project-correlation`, `label-prefilter`, then `naming-heuristic`; the `postman-repo` label is an ownership signal. Ambiguous or unsupported results are reported for **manual review** rather than guessed.
|
|
153
|
+
|
|
154
|
+
## v1 boundaries
|
|
155
|
+
|
|
156
|
+
v1 does not probe `Cloud Run`, `GKE`, or `Functions` runtime URLs (there is no GCP catalog of runtime specs), does not fetch arbitrary remote URLs, does not synthesize routes from traffic observations (APIM shadow-API discovery yields operations, not contracts), and does not convert gRPC or `google.api.Service` definitions to OpenAPI. Non-OpenAPI `API Hub` spec types (proto, WSDL, MCP) surface as manual review candidates rather than being converted.
|
|
157
|
+
|
|
158
|
+
## How it works
|
|
159
|
+
|
|
160
|
+
1. Validate `project-id` and Google credentials.
|
|
161
|
+
2. Prefer a committed repository specification.
|
|
162
|
+
3. Probe supported providers fail-soft and collect candidates.
|
|
163
|
+
4. Narrow and rank candidates using repository and project signals.
|
|
164
|
+
5. Export and validate the selected OpenAPI document inside `output-dir`.
|
|
165
|
+
6. Emit resolution, export, candidate, and narrowing outputs.
|
|
166
|
+
|
|
167
|
+
## Resources
|
|
168
|
+
|
|
169
|
+
- [Provider contracts](docs/providers.md)
|
|
170
|
+
- [Repository association](docs/repository-association.md)
|
|
171
|
+
- [Per-service-repo onboarding workflow template](templates/postman-gcp-onboard.yml)
|
|
172
|
+
- [Live testing runbook](docs/LIVE_TESTING_RUNBOOK.md)
|
|
173
|
+
- [RELEASE_POLICY.md](RELEASE_POLICY.md), [SECURITY.md](SECURITY.md), [SUPPORT.md](SUPPORT.md)
|
|
174
|
+
|
|
175
|
+
## Telemetry
|
|
176
|
+
|
|
177
|
+
The action emits one anonymous `completion` event per run (action name `gcp-spec-discovery`) through `@postman-cse/automation-telemetry-core`. The payload excludes project identifiers, resource names, labels, specification content, URLs, and credentials. Opt out with `POSTMAN_ACTIONS_TELEMETRY=off` or `DO_NOT_TRACK=1`.
|
|
178
|
+
|
|
179
|
+
## License
|
|
180
|
+
|
|
181
|
+
[MIT](LICENSE)
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
# Release Policy
|
|
2
|
+
|
|
3
|
+
## Source of truth
|
|
4
|
+
|
|
5
|
+
Git tags and GitHub releases are the public release identifiers for this action. `package.json` versions support npm packaging, but consumers should select action versions by Git tag. The committed `dist/` bundle is part of the released artifact because GitHub Actions runs it verbatim from the tag.
|
|
6
|
+
|
|
7
|
+
## Tag policy
|
|
8
|
+
|
|
9
|
+
- Immutable releases use `vMAJOR.MINOR.PATCH` tags.
|
|
10
|
+
- The rolling major and minor aliases (`vMAJOR` and `vMAJOR.MINOR`, i.e. `v1` and `v1.0`) are force-moved by the release workflow's `advance-rolling-aliases` job after a successful immutable publish.
|
|
11
|
+
- Existing immutable release tags are never force-pushed or rewritten.
|
|
12
|
+
- Every release tag commit must equal protected `origin/main`; the release workflow verifies this before publication.
|
|
13
|
+
- `v0` tags stay frozen at the last `v0` release.
|
|
14
|
+
- Every immutable release tag has a GitHub release with generated notes.
|
|
15
|
+
|
|
16
|
+
## Release checks
|
|
17
|
+
|
|
18
|
+
Run the package validators from this directory before pushing an immutable tag:
|
|
19
|
+
|
|
20
|
+
1. Confirm the working tree is clean.
|
|
21
|
+
2. `npm test`
|
|
22
|
+
3. `npm run typecheck`
|
|
23
|
+
4. `npm run lint`
|
|
24
|
+
5. `npm run build`
|
|
25
|
+
6. `npm run verify:dist`
|
|
26
|
+
7. `npm run docs:tables` when `action.yml` changes, then confirm the `README.md` tables still match.
|
|
27
|
+
8. Confirm `SECURITY.md`, `SUPPORT.md`, and this file still describe the release surface.
|
|
28
|
+
|
|
29
|
+
## npm package
|
|
30
|
+
|
|
31
|
+
The CLI publishes as `@postman-cse/onboarding-gcp-spec-discovery` with versions that match the GitHub release tag. Rolling major/minor aliases update action channels and skip npm publishing.
|
|
32
|
+
|
|
33
|
+
## Compatibility
|
|
34
|
+
|
|
35
|
+
This action emits `spec-path`, `service-name`, and resolution metadata for downstream actions. Changes to output names, output types, required inputs, or resolution semantics are breaking changes and require a new major release.
|
|
36
|
+
|
|
37
|
+
## Security fixes
|
|
38
|
+
|
|
39
|
+
Security fixes ship on the latest immutable `vMAJOR.MINOR.PATCH` tag and move onto the rolling major/minor aliases. Older immutable tags stay published for reproducibility. See [Security Policy](SECURITY.md).
|
|
40
|
+
|
|
41
|
+
## Suite release order
|
|
42
|
+
|
|
43
|
+
GCP discovery can be released on its own unless a downstream onboarding example depends on a new composite or bootstrap feature. When multiple onboarding actions change together, release the lower-level actions first, then update the composite action after its pinned dependencies are available.
|
package/SECURITY.md
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# Security Policy
|
|
2
|
+
|
|
3
|
+
## Supported Versions
|
|
4
|
+
|
|
5
|
+
Only the latest `v1.x.y` release (tracked by rolling major and minor aliases such as `v1` and `v1.0`) receives security fixes. Older tags remain published for reproducibility and are never retroactively modified.
|
|
6
|
+
|
|
7
|
+
## Reporting a Vulnerability
|
|
8
|
+
|
|
9
|
+
Please do not open a public issue for security reports.
|
|
10
|
+
|
|
11
|
+
- Preferred: use GitHub private vulnerability reporting on this repository (Security tab, "Report a vulnerability").
|
|
12
|
+
- Alternative: email [security@postman.com](mailto:security@postman.com) and mention the repository name.
|
|
13
|
+
|
|
14
|
+
You should receive an acknowledgement within five business days. Please include reproduction steps, the action version tag, and any relevant (redacted) workflow logs.
|
|
15
|
+
|
|
16
|
+
## Scope Notes
|
|
17
|
+
|
|
18
|
+
- This action reads GCP credentials from the runner environment and calls read-only GCP ARM APIs. Prefer GitHub OIDC federation via `gcp/login` with `id-token: write` and least-privilege Reader roles needed for the providers you use.
|
|
19
|
+
- This action does not require a Postman API key or Postman access token. Postman credentials are consumed by downstream onboarding actions after `spec-path` is resolved.
|
|
20
|
+
- Use `postman-resolve-service-token-action` as the primary way to mint a Postman access token and resolve the team ID from a service-account PMAK.
|
|
21
|
+
- When service-account minting is unavailable, use the Postman CLI credential store created by `postman login` as the fallback source. Do not paste copied cookies, DevTools values, or manually harvested session credentials into workflow secrets.
|
|
22
|
+
- Downstream `credential-preflight` supports `warn` and `enforce` only. Do not document or depend on a public opt-out.
|
|
23
|
+
- Reports about secrets you exposed in your own workflow configuration are out of scope; rotate the credential in GCP or Postman immediately.
|
|
24
|
+
|
|
25
|
+
## Credential Matrix
|
|
26
|
+
|
|
27
|
+
| Credential | Used by | Recommended source | Notes |
|
|
28
|
+
| --- | --- | --- | --- |
|
|
29
|
+
| GCP credentials | `gcp/login` and this action | GitHub OIDC federated credentials | Grant least-privilege Reader roles for discovery. |
|
|
30
|
+
| `POSTMAN_SERVICE_ACCOUNT_API_KEY` | `postman-resolve-service-token-action` and downstream onboarding actions | GitHub secret | Must be a Postman service-account PMAK when minting an access token. |
|
|
31
|
+
| Postman access token | Downstream onboarding actions | `postman-resolve-service-token-action` output | Pass through `steps.postman_token.outputs.token`; do not store unless your workflow requires it. |
|
|
32
|
+
| Postman team ID | Composite onboarding action | `postman-resolve-service-token-action` output | Pass through `steps.postman_token.outputs.team-id` to the composite action for org-mode handoff. Direct bootstrap workflows should use `workspace-team-id` for workspace creation. |
|
package/SUPPORT.md
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
# Support
|
|
2
|
+
|
|
3
|
+
## Before opening an issue
|
|
4
|
+
|
|
5
|
+
Check the action logs for the selected provider, `resolution-status`, `source-type`, and `mapping-confidence`. The action is read-only against GCP and silently skips providers your role cannot read, so most discovery failures are caused by subscription mismatch, missing RBAC read permissions, missing repo-local specs, or ambiguous service names.
|
|
6
|
+
|
|
7
|
+
## What to include
|
|
8
|
+
|
|
9
|
+
- The action version or tag you ran.
|
|
10
|
+
- The `subscription-id` value and provider you expected to resolve.
|
|
11
|
+
- The relevant sanitized workflow step log.
|
|
12
|
+
- The `resolution-json` output with secrets, subscription IDs, and private hostnames redacted.
|
|
13
|
+
- Whether the workflow used gcp/login OIDC federation or preconfigured GCP credentials.
|
|
14
|
+
- Whether the result was handed to `postman-api-onboarding-action` or `postman-bootstrap-action`.
|
|
15
|
+
|
|
16
|
+
Do not include GCP secrets, Postman API keys, Postman access tokens, private OpenAPI documents, or unredacted account identifiers in public issues.
|
|
17
|
+
|
|
18
|
+
## Common support paths
|
|
19
|
+
|
|
20
|
+
| Symptom | First check |
|
|
21
|
+
| --- | --- |
|
|
22
|
+
| `GCP credentials are missing or invalid` | Confirm `gcp/login` ran first and the federated credential covers this repository and environment. |
|
|
23
|
+
| Provider was skipped | Add the provider's read-only IAM permissions from [docs/providers.md](docs/providers.md#security-and-iam). |
|
|
24
|
+
| `manual-review` result | Provide a repo-local spec, an exact APIM `api-id`, a canonical `postman:repo` tag, or a stronger service-name hint. |
|
|
25
|
+
| Downstream Postman onboarding failed | Check the service-token step outputs and downstream `credential-preflight` setting. Valid values are `warn` and `enforce`. |
|
|
26
|
+
| APIM or App Service API was not selected | Confirm the resource group, API type, current APIM revision, and `siteConfig.apiDefinition.url`; then review [docs/providers.md](docs/providers.md). |
|
|
27
|
+
|
|
28
|
+
## Security reports
|
|
29
|
+
|
|
30
|
+
Use [SECURITY.md](SECURITY.md) for vulnerability reports or credential exposure concerns. Do not open a public issue for security-sensitive material.
|
package/action.yml
ADDED
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
name: 'Postman Onboarding: GCP Spec Discovery'
|
|
2
|
+
description: Discover GCP-hosted API specs and expose a spec path for Postman onboarding. Part of the Postman API Onboarding suite.
|
|
3
|
+
author: Postman
|
|
4
|
+
branding:
|
|
5
|
+
icon: cloud
|
|
6
|
+
color: orange
|
|
7
|
+
inputs:
|
|
8
|
+
mode:
|
|
9
|
+
description: 'Discovery mode: resolve-one selects the single best service for this repository; discover-many exports every exportable candidate.'
|
|
10
|
+
required: false
|
|
11
|
+
default: resolve-one
|
|
12
|
+
project-id:
|
|
13
|
+
description: Google Cloud project ID used as the exact discovery and credential preflight scope.
|
|
14
|
+
required: true
|
|
15
|
+
location:
|
|
16
|
+
description: Google Cloud API Gateway location. v1 supports global.
|
|
17
|
+
required: false
|
|
18
|
+
default: global
|
|
19
|
+
api-id:
|
|
20
|
+
description: Optional full API Gateway config, Cloud Endpoints config, Apigee proxy revision, API Hub spec, Apigee portal apidoc, Vertex extension, Dialogflow tool, or CES tool/toolset resource name. Use this to bypass broader project discovery.
|
|
21
|
+
required: false
|
|
22
|
+
default: ''
|
|
23
|
+
repo-slug:
|
|
24
|
+
description: Repository slug (owner/name) used for repository-association matching against postman-repo resource labels. Defaults to the CI-detected repository (GITHUB_REPOSITORY).
|
|
25
|
+
required: false
|
|
26
|
+
default: ''
|
|
27
|
+
expected-service-name:
|
|
28
|
+
description: Optional expected service name used as a ranking hint and as the reported service name when resolution stays manual-review.
|
|
29
|
+
required: false
|
|
30
|
+
default: ''
|
|
31
|
+
expected-api-ids-json:
|
|
32
|
+
description: Optional JSON array of full resource names that this repository expects to own; exact matches rank highest during resolution.
|
|
33
|
+
required: false
|
|
34
|
+
default: '[]'
|
|
35
|
+
service-mapping-json:
|
|
36
|
+
description: Optional JSON object mapping resource names to service names, used to name exported specs for label-incapable providers.
|
|
37
|
+
required: false
|
|
38
|
+
default: '{}'
|
|
39
|
+
output-dir:
|
|
40
|
+
description: Directory under the repository root where generated specs are written.
|
|
41
|
+
required: false
|
|
42
|
+
default: discovered-specs
|
|
43
|
+
postman-api-key:
|
|
44
|
+
description: Optional service-account PMAK used to mint or re-mint a postman-access-token for telemetry enrichment (account_type). Not used for any GCP or Postman asset operation.
|
|
45
|
+
required: false
|
|
46
|
+
default: ''
|
|
47
|
+
postman-access-token:
|
|
48
|
+
description: Optional Postman service-account access token, used only to enrich anonymous telemetry with the session account_type. When omitted, postman-api-key alone can mint one for the same purpose. Not used for any GCP or Postman asset operation.
|
|
49
|
+
required: false
|
|
50
|
+
default: ''
|
|
51
|
+
outputs:
|
|
52
|
+
resolution-json:
|
|
53
|
+
description: JSON resolution result describing status, source type, confidence, and evidence.
|
|
54
|
+
resolution-status:
|
|
55
|
+
description: 'Resolution status: resolved or unresolved.'
|
|
56
|
+
source-type:
|
|
57
|
+
description: 'Resolved source type: repo-spec, api-gateway-config, cloud-endpoints-config, apigee-proxy, apigee-env-oas, api-hub-spec, app-integration-trigger, connectors-custom-spec, connectors-generated-spec, apigee-portal-doc, vertex-extension-manifest, agent-engine-generated-spec, dialogflow-tool-schema, ces-tool-schema, ces-toolset-schema, iac-embedded, manual-review, or discover-many.'
|
|
58
|
+
mapping-confidence:
|
|
59
|
+
description: Numeric confidence score for the selected service candidate.
|
|
60
|
+
spec-path:
|
|
61
|
+
description: Path to the resolved or generated specification when available.
|
|
62
|
+
api-id:
|
|
63
|
+
description: Full resource name of the exported cloud source (API Gateway config, Cloud Endpoints config, Apigee proxy revision, API Hub spec, Apigee portal apidoc, Vertex extension, Agent Engine, Dialogflow tool, or CES tool/toolset); empty for repo, generated, or IaC-local resolutions.
|
|
64
|
+
service-name:
|
|
65
|
+
description: Resolved service name.
|
|
66
|
+
services-json:
|
|
67
|
+
description: 'discover-many output: JSON array of exported services.'
|
|
68
|
+
service-count:
|
|
69
|
+
description: 'discover-many output: number of exported services.'
|
|
70
|
+
export-summary-json:
|
|
71
|
+
description: JSON summary of attempted, exported, failed, and skipped candidates.
|
|
72
|
+
candidates-json:
|
|
73
|
+
description: Ranked ambiguous candidates as JSON when resolution is unresolved with at least two candidates; empty otherwise.
|
|
74
|
+
provider-type:
|
|
75
|
+
description: 'Provider that produced the resolved spec: api-gateway, cloud-endpoints, apigee, api-hub, app-integration, connectors-custom, apigee-portal, vertex-extensions, agent-engines, dialogflow-tools, ces-toolsets, or iac-local.'
|
|
76
|
+
spec-format:
|
|
77
|
+
description: 'Format of the resolved spec: openapi-yaml or openapi-json.'
|
|
78
|
+
contract-origin:
|
|
79
|
+
description: Compatibility output; always empty in v1.
|
|
80
|
+
contract-metadata-path:
|
|
81
|
+
description: Compatibility output; always empty in v1.
|
|
82
|
+
variant-count:
|
|
83
|
+
description: Compatibility output; always empty in v1.
|
|
84
|
+
derived-openapi-path:
|
|
85
|
+
description: Path to the derived OpenAPI 3.x document when the source was not already OpenAPI 3.x.
|
|
86
|
+
derived-openapi-version:
|
|
87
|
+
description: 'OpenAPI version of the derived document: 3.0.3 or 3.1.0.'
|
|
88
|
+
derived-openapi-completeness:
|
|
89
|
+
description: Whether the derived OpenAPI document is full or partial.
|
|
90
|
+
derived-openapi-format:
|
|
91
|
+
description: 'Serialization format of the derived OpenAPI document: openapi-json.'
|
|
92
|
+
derived-openapi-evidence-json:
|
|
93
|
+
description: JSON array of evidence strings describing how the derived OpenAPI document was produced.
|
|
94
|
+
narrowing-strategy:
|
|
95
|
+
description: 'Narrowing tier that produced the candidate ordering: iac-fingerprint, project-correlation, label-prefilter, naming-heuristic, or none.'
|
|
96
|
+
runs:
|
|
97
|
+
using: node24
|
|
98
|
+
main: dist/index.cjs
|