Giter VIP home page Giter VIP logo

sample-go-mtls-oauth-client's Introduction

sample-go-mtls-oauth-client

Sample Go OAuth client using mTLS certificates for authentication with Cloudentity’s Authorization Control Plane. In this example self-signed certificate will be used.

Prerequisites

  • Docker
  • Golang
  • Signed certificate

How to build and run

If you do not have Golang installed on your machine you can simply build it within a Docker container to do that simply execute

make build

in a root directory of this project. Once the build is finished just run the application

./sample-go-mtls-oauth-client

If you have Golang installed you can start the application by running

make run

After successful run application will print the following logs:

Login endpoint available at: http://localhost:18888/login
Callback endpoint available at: http://localhost:18888/callback

URLs will vary depends on your setup.

You can check the usage of the sample-go-mtls-oauth-client app by running application with help flag.

./sample-go-mtls-oauth-client --help

How to configure the sample app

  1. Go to "Applications" and create a new "Server Web Application" in the ACP dashboard and do the following instructions:

    • Change "Token Endpoint Authentication Method" to "tls_client_auth".
    • Change "Redirect URL" to the value from "Callback endpoint" presented in sample application logs.
    • Copy the "Client ID" value it will be used later.
  2. Go to "Settings", "Authorization" and fill "Root CAs" with your certificate.

  3. Start sample application:

./sample-go-mtls-oauth-client --clientId <Client ID> -key <Path to private key> -cert <Path to certificate> -issuerUrl https://localhost:8443/default/default -port 18888 

Tutorial

Here you can find detailed instructions about mTLS configuration in Cloudentity’s Authorization Control Plane.

sample-go-mtls-oauth-client's People

Contributors

holowinski avatar ptrsd avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.