| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
There was a problem hiding this comment.
This PR adds a lightweight schema-based validation layer for private registry credential objects, migrates existing start-proxy auth config parsing to use it, and extends supported OIDC configurations with Cloudsmith + GCP while also propagating the existing replaces-base flag through to proxy outputs.
Changes:
| File | Description |
|---|---|
| src/start-proxy/validation.ts | New auth-config extraction + schema-based cloning/filtering. |
| src/start-proxy/validation.test.ts | Tests for schema-based auth-config extraction and key filtering. |
| src/start-proxy/types.ts | Migrates auth/OIDC types to schema-based validators; adds Cloudsmith/GCP; adds replaces-base. |
| src/start-proxy/types.test.ts | Adds pretty-print coverage for Cloudsmith/GCP and updates secret-hiding tests. |
| src/start-proxy.ts | Switches to new getAuthConfig and propagates replaces-base. |
| src/start-proxy.test.ts | Updates OIDC config tests to iterate over oidcSchemas. |
| src/start-proxy-action.ts | Includes replaces-base in proxy_urls output entries. |
| src/json/testing-util.ts | Adds makeFromSchema test helper for building objects from schemas. |
| src/json/index.ts | Adds schema/validator types + validateSchema implementation. |
| src/json/index.test.ts | Adds unit tests for required vs optional schema validation behavior. |
| lib/start-proxy-action.js | Generated output update (not reviewed). |
src/start-proxy/types.ts:46
export function isUsernamePassword(
config: AuthConfig,
): config is UsernamePassword {
return json.validateSchema(usernamePasswordSchema, config);
}
Sorry, something went wrong.
There was a problem hiding this comment.
What happens when we merge this? Does the authentication proxy already support these new registries or is there more work to do?
Sorry, something went wrong.
@henrymercer The authentication proxy already supports it (Cloudsmith and GCP). Also, it parses the JSON configuration as a generic map and would ignore keys it doesn't understand, so even if we ended up in a scenario where we have newer configurations than the version of the proxy that we have supports, it shouldn't cause problems. In general, the Dependabot team have been working on the implementation in the proxy and backend. |
Sorry, something went wrong.
There was a problem hiding this comment.
Just one thing I missed before. Feel free to merge if you don't think it's important.
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
This PR primarily adds validation for Cloudsmith and GCP OIDC configurations, so that they can be correctly propagated to the authentication proxy for private package registries when given to the start-proxy action as input in GitHub-managed workflows.
The first few commits add a lightweight JSON schema implementation to simplify the specification and validation of different credential objects. The existing private registry configuration types are then migrated to make use of this.
We take advantage of this to simplify some of the validation and testing logic so that we have to update fewer places when adding new configuration types.
Then we add the two new configuration types.
Finally, we add validation for the replaces-base setting, which has been around for a while, but wasn't accepted until now.
I'd suggest reviewing this commit-by-commit.
Risk assessment
For internal use only. Please select the risk level of this change:
Which use cases does this change impact?
Workflow types:
Products:
Environments:
How did/will you validate this change?
If something goes wrong after this change is released, what are the mitigation and rollback strategies?
How will you know if something goes wrong after this change is released?
Are there any special considerations for merging or releasing this change?
Merge / deployment checklist