Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cloud Controller does not accept service-broker schemas with json-schema draft-06 anymore #2677

Closed
wanddynosios opened this issue Feb 11, 2022 · 1 comment
Assignees

Comments

@wanddynosios
Copy link

Issue

After Upgrading to cf-deployment v17.1.0 (CAPI 1.123.0), our service-broker schemas (via AWS Servicebroker) which use json-schema draft-06 do not work anymore:

$ cf update-service-broker ocf-aws-services-broker $BROKER_USER $BROKER_USER_PASSWORD "https://aws-sb.${SYSTEM_DOMAIN}"
Updating service broker ocf-aws-services-broker as admin...

Job (***) failed: Service broker catalog is invalid: 
Service aws-s3
  Plan standard
    Schemas
      Schema service_instance.create.parameters is not valid. Custom meta schemas are not supported.

Context

CC has updated its json-schema gem to 2.8.1.

In this update, the gem has changed the syntax for the latest json-schema to "http://json-schema.org/draft/schema#". This was apparently because json-schema.org has released it in violation of the usual naming-scheme, and the gem adapted to that (see changelog).

json-schema.org later fixed that and named the schema in accordance to the scheme: "http://json-schema.org/draft-06/schema#". The "draft/schema#"-version is now undefined, as the link does not provide the schema.
The gem however has not adapted to this change (since 2018).

To accommodate this change, CC has adapted the "wrong" naming scheme, so it is now pinned to an invalid version without any chance of upgrading.

Steps to Reproduce

Try to apply any service-schema with draft-06 (in CC 1.123.0)

Expected result

There is no breaking change and the apply works with draft-06 as before.

Current result

see above.

Possible Fix

I would suggest switching to another json-schema-validator, as per this suggestion.

@philippthun
Copy link
Member

The json-schema gem has been reverted to version 2.8.0. The link for JSON schema draft 6 is https://json-schema.org/draft-06/schema.

This change will be included in the next capi-release (CAPI 1.128.0).

Note: As a workaround, changing the JSON schema to "draft-4" should mitigate the problem (this is also the version guaranteed to work: "Platforms MUST support at least JSON Schema draft v4.").

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants