orange-cloudfoundry / osb-cmdb

A configuration management db for Open Service Broker API broker implementations
Apache License 2.0
14 stars 1 forks source link

Propagate incoming OSB metadata to backing services using custom param until osb 2.16 support for annotations #15

Closed gberche-orange closed 4 years ago

gberche-orange commented 4 years ago

Expected behavior

As a service broker author, in order to ease traceability from brokered service metadata (e.g. service-instance/org/space/user guid) to backing service resource (e.g. Iaas metadata stored in vms), I need an opt-in to enable the incoming OSB metadata on service instance to be passed along as a custom param such as x-osb-cmdb that some broker might leverage (until 1st class annotations support in 2.16)

As a 1st step, this custom param could contain the same payload as #10

{
    "labels": {
        "brokered_service_instance_guid": "3aa96c94-1d01-4389-ab4f-260d99257215",
        "brokered_service_context_organization_guid": "c2169b61-9360-4d67-968c-575f3a10edf5",
        "brokered_service_originating_identity_user_id": "0d02117b-aa21-43e2-b35e-8ad6f8223519",
        "brokered_service_context_space_guid": "1a603476-a3a1-4c32-8021-d2a7b9b7c6b4",
        "backing_service_instance_guid": "191260bb-3477-422d-8f40-bf053ccf6930"
    },
    "annotations": {
        "brokered_service_context_instance_name": "osb-cmdb-broker-0-smoketest-1578565892",
        "brokered_service_context_space_name": "smoke-tests",
        "brokered_service_api_info_location": "api.mycf.org/v2/info",
        "brokered_service_context_organization_name": "osb-cmdb-brokered-services-org-client-0"
    }
}

Observed behavior

Only osb-provided params will be supported with #12