Skip to content

leathersole/3scale-client-proto

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

A prototype of 3scale client

The purposes of this project are:

  • Test whether a 3scale product is integrated with a OIDC IdP.

  • Be illustrative how 3scale API gateway, IdP and client interact.

Features

  • Pull products and aplications list from 3scale Management API

  • Login to OpenID Connect Identity Provider

  • Request to 3scale API gateway

What does not this project do?

  • This project doesn’t aim to perform complex interaction with 3scale API Gateway. You can use Postman for the purpose.

  • Checking secureness is out of scope. i.e. This application logs information like access tokens, and this doesn’t check TLS certificates.

Limitations

  • This project is just a prototype. There’s no error handling or no test code. If there is a need, we may create a client that is easier to use based on the user’s opinion.

Tested environments

Prerequisites

  1. RH-SSO

  2. A 3scale Product that authentication method is OIDC

  3. A 3scale Application under the Product that Redirect URL is http://localhost:3000/api_provider/oidc_auth/cb

Installation

npm

git clone https://github.com/leathersole/3scale-client-proto.git
cd 3scale-client-proto
npm install
npm start

Docker

docker pull leathersole/3scale-client-proto:latest
docker run --rm -p 3000:3000 leathersole/3scale-client-proto:latest

Podman

podman pull docker.io/leathersole/3scale-client-proto:latest
podman run --rm -p 3000:3000 docker.io/leathersole/3scale-client-proto:latest

Usage

  1. Open http://localhost:3000/api_provider/

  2. Enter your admin portal domain and access token

  3. Click Get Product list button

  4. After Products menu is created, select a product that authentication method is OIDC

  5. Click Use this product button

  6. After Applications menu is created, select an application

  7. Click Use this application button

  8. To login to OIDC IdP, click Login button

  9. Login to IdP. You’ll be redirected to the the api_provider page

  10. Click Submit button to call a 3scale API gateway.

Build container

cd ./buildah
buildah login registry.redhat.io
buildah unshare ./build.sh

License

This project is made available under the Apache-2.0 License.