Skip to content

Laugslander/caddy-service-token

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

caddy-service-token

Plugin for Caddy that automatically injects an HSP IAM service identity access token as request header.
Useful when running Caddy as a reverse proxy for a HSP service in a microservice architecture.

Configuration

{
    order service_token first
}

:8080 {
    service_token {
        region "<region>"
        environment "<environment>"
        service_id "<service_id>"
        service_key "<service_key>"
    }

    reverse_proxy <hsp_service> {
        header_up Host {upstream_hostport}
    }
}

Populate all variables marked with <variable>.

Development

Install xcaddy:

go install github.com/caddyserver/xcaddy/cmd/xcaddy@latest

Run the plugin locally:

xcaddy run

Build caddy with this plugin:

xcaddy build --with github.com/Laugslander/service-caddy-token

For more information, see Extending Caddy.

License

License is Apache 2.0

About

Caddy plugin that injects HSP IAM service identity access token as request header

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors