Custom Proxy

It is possible to configure access to external resources through GCMS REST endpoints that check for GCMS authentication and authorization.

1 Configuration

External resources are configured in the configuration files:

Node/etc/conf.d/*.conf


// configure custom resource with key "myresourcekey"
$CUSTOM_PROXY["myresourcekey"] = array(
	"baseUrl" => "http://myresource/basepath",
	"methods" => array(
		"GET", "POST"
	),
	"permission" => array(
		"type" => 90001,
		"id" => 1
	),
	"headers" => array(
		"Authorization" => "Bearer <token>"
	)
);

Property Description Mandatory
baseUrl Base URL of the accessed resource. yes
methods Optional list of allowed HTTP methods. Possible values are DELETE, GET, HEAD, OPTIONS, POST, PUT no
permission GCMS Permission required for accessing the resource. no
headers Optional list of request headers that will be added by the Proxy no

2 REST Endpoint

The base URL for the proxy is http(s)://[gcms.hostname]/CNPortletapp/rest/proxy/[key] where [key] is the configuration key of the resource.

Any path after the [key] section will be appended to the configured baseUrl.

All headers and query parameters sent to the proxy endpoints will be forwarded to the external resource.