Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

This authentication flow uses the bearer token in the Authorization header in the incoming request for the request to the external server. This could e.g. be a JWT or an OAuth2.0 token.

Connections via the Gateway Proxy

Connections to external servers can be established via the Gateway Proxy. Simply provide the Gateway URI and the external URIs, that should be proxied in connection-routing.yml.

See Example Configuration

See Reference

Configuration

Connection routing is configured using the file connection-routing.yml. This file has to be put in the application’s working directory.

...

Example connection-routing.yml

Code Block
gateway-proxy:
    uri: http://gateway-proxy.host/proxy/stream
    root-uris:
        - https://elmdemo.smartfacts.com:9443/**

connection-routing:
  -
    cdcm-connection-id: forward-bearer
    methods: ALL
    root-uris:
      - https://host1/**
      - https://host2/data/**
  -
    cdcm-connection-id: oauth20
    methods: GET,POST
    root-uris:
      - https://host3:4552/v1.0/**

  -
    cdcm-connection-id: oauth10a
    methods: ALL
    root-uris:
      - https://host4/oauth10a/**

  -
    cdcm-connection-id: fixed-headers
    methods: ALL
    root-uris:
      - https://host5:8080/**

connections:
  forward-bearer:
    connection-type: BEARER_TOKEN_FORWARD
  oauth20:
    connection-type: OAUTH20
    client-id: <client-id>
    client-secret: <client-secret>
    user-info-uri: <user-info-uri>
    scopes: openid, profile, email, Sites.Read.All
    authorization-uri: <authorization-uri>
    token-uri: <token-uri>
  oauth10a:
    connection-type: OAUTH10A
    consumer-key: <key>
    consumer-secret: <secret>
    root-services: <root-services-uri>
    service-principal-enabled: false
  fixed-headers:
    connection-type: FIXED_HEADERS
    headers:
      Authorization: <auth-header-value>
      X-Custom-Auth-Header: <custom-auth-header-value>

Reference

Gateway Proxy

Key

Description

uri

The URI of the gateway proxy stream endpoint.

E.g. http://gateway-proxy.host/proxy/stream

root-uris

A list of URIs that can use ant path notation as described in the Spring Framework documentation.
Connections to URIs matching one of the root-uriswill be established via the Gateway Proxy

Configuration Routing Table

...