Giter VIP home page Giter VIP logo

gluu-gateway's Introduction

Gluu Gateway

!!! Attention There will be no further release of Gluu Gateway after version 4.2. This product has reached its EOL for new deployments.

Gluu Gateway (GG) is an API gateway that leverages the Gluu Server for central OAuth client management and access control. Documentation can be found on the Gluu Gateway docs.

gluu-gateway's People

Contributors

adrian-gluu avatar altexy avatar bcarroll avatar devrimyatar avatar duttarnab avatar ganesh-at-wiw avatar kepuss avatar ldeveloperl1985 avatar natt-tester avatar nikdavnik avatar nynymike avatar shmorri avatar willow9886 avatar yuriyz avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

gluu-gateway's Issues

Add introspection headers in OAuth Mode

In OAuth Mode, the oauth consumer plugin should add new headers with data returned from introspection including:

  • OAUTH_SCOPES
  • OAUTH_EXPIRATION
  • OAUTH_CLIENT_ID

Remove OAuth GUI from Konga

We are using the Gluu Server for OAuth client authentication.

image

This OAuth tab section should be removed... it's useless.

Bug : avoid race condition during concurrent handling of users

During get_token_by_code call we overwrite configuration object each time. It perfectly works with one single user, but if there are many users then we will get race condition in this place, for example:

  1. user1 - code1
  2. user2 - code2
    With global configuration overwrite user2 can get code1 due to race condition. Please pass parameters by reference or otherwise use own wrapper instead of global configuration object.

https://github.com/GluuFederation/gluu-gateway/blob/cda9dfc3914095c40f9f23d98e235869829f6bb5/kong-openid-rp/kong/plugins/kong-openid-rp/helper.lua#L35-36

Konga should re-register client

If the client is expired, Konga should register a new client.

In the instructions we should add a note to enable "pre-authorization" and to extend the client expiration date. That will take care of the warnings and the expiration problem.

Improve UMA RS scope expression UI

image

The source for the scope expression should be hidden. If the user explicitly request to see it, it should be expose a pop-up text area (not one long line).

There should be a link to the "SECURITY" view of the API, which should display graphically the existing scope expression.

Dynamic enrollment should not require any claims

image

Email should not be required. You may only get a pairwise sub. Create user with even that alone.
For any other required fields (for LDAP), use random GUIDs, For a dynamically enrolled client, you will not get any userinfo.

Use Same RPT token for diff requested path in mix_mode

  1. User create oauth2-consumer with mix_mode

  2. request to /photo path with oauth2_access_token in the header

  3. introspect_access_token and cache it

  4. control pass to RS plugin

  5. get_rpt and check_Access = granted then cache RPT token {access_token: “AT1”, rpt: “rpt1”, permission: {path:”/post”, method:”GET”}}

  6. Next time user request /picture path with the same oauth2_access_token

  7. mode mix_mode then replace the header with rpt

  8. check the cache. the cached path is /photo but requested path is /picture then here use the same RPT which is already in the cache i:e associated_rpt

License enforcement

This is licensed software available for use by Gluu support customers.

We need to enforce a license check before allowing a user to proceed with using the software. During license enforcement, we must confirm that the license's product parameter includes api_gateway.

Upgrade to standard oxd post-installation workflow

GG setup asks for oxd https URL but gives http method as default.

image

It raises question--the http port should not be active at all on oxd. If it is, disable it.

Also, there is now a standard post installation process. See this thread

User information not displayed

image

image

If Konga asked for profile as an OpenID Connect scope, why isn't the user being dynamically generated? Why doesn't the username display in the profile section? Also is the username noted in the logs?

Maintain legacy OAuth headers

Kong defines a few headers:

https://getkong.org/plugins/oauth2-authentication/#upstream-headers

We will need to add

* X-Consumer-ID, the ID of the Consumer on Kong
* ADD THIS TO PLUGIN & KONGA: X-Consumer-Custom-ID, the custom_id of the Consumer (if set)
* X-Consumer-Username, the username of the Consumer (if set)
* ADD THIS FOR OAUTH2 CLIENTS ONLY: X-Authenticated-Scope, the comma-separated list of scopes that the end user has authenticated, if available (only if the consumer is not the 'anonymous' consumer)
* OMIT: X-Authenticated-Userid, the logged-in user ID who has granted permission to the client (only if the consumer is not the 'anonymous' consumer)
* X-Anonymous-Consumer, will be set to true when authentication failed, and the 'anonymous' consumer was set instead.

Restore to factory default script

As Kong loads config data to the database, there needs to be a way to "clear" the data. It could be just a command line script that drops database and re-adds it.

Modify API Security

As far as I can tell, there is no way to get back previous security setting or to change the configuration. This will not work--being able to view and change the security is essential.

External OP support for Consumer OAuth2 client authn

The Kong OAuth auth plugin should not be used.

We need to write a lua -auth plugin to support using the Gluu Sever for client registration, authentication and introspection. There are many -auth examples in the Kong plugins folder, including LDAP, HMAC, basic and more.

On successful client authentication, Kong should introspect the access_token and cache it until it's expired.

NOTE: We do not want to deal with any front channel issues until we complete the OpenID Connect RP plugin. This OAuth2 client is for back-channel only authentication! Scopes have no meaning here!

image

Currently when you add an OAuth client, you get this:

image

In the Gluu Gateway, the client should be created directly against the Gluu Server OpenID Provider using Discovery and Dynamic Client Registration. The only grant type should be client_credentials.

The Register Client form should look like this.

image

As this is a "back channel only" client, redirect_uri is not relevant. If it's required for client registration, use https://localhost.

Success screen should look like this:

image

View of clients should look like this

image

Add SECURITY for OAuth Scopes

In OAuth-mode, the admin can specify which scopes are required--exactly as in UMA. The scopes claim may be present in Oauth token introspection response JSON.

For example, a person authorizes a client access token for the calendar scope. Using the Konga UI, the admin can set a policy that requires the calendar scope to call an upstream api.

Note: UMA scopes are different then OAuth scopes.

Restrict API's Consumer can access

In the OAuth2 client authentication section of the consumer configuration, we should add a method to Enable or Disable API restriction. If enabled, the admin can click on a link to launch a modal window to search for and select available API's. The client can only call specified API's if client restriction is enabled.

image

Update text for oxd plugin

Change to

This plugin enables the use of an external OpenID Provider for OAuth2 client registration and 
authentication. It needs to connect via `https` to Gluu's `oxd-https-extension` service, which is an OAuth2 
client middleware service.

image

Update text UMA-RS API config

Never hard code a link to a specific docs version.

image

In this case, the text should read.

Protect API paths by requiring specific UMA Scopes for certain methods.
 

UMA-RS is listed as a logging plugin?

If you edit a "consumer", there is a plugins tab:

image

Why is UMA-RS in the "logging" section?

And when I click on the + to add an UMA_RS, I get this cryptic form:

image

This makes no sense to me. Can we signal to Kong not to allow the UMA RS plugin to be configured on a per client basis? This is not how it was meant to work. By definition, the consumer is not the RS (it's the UMA Client, OpenID Connect RP, or OAuth Client... but never the RS!)

Add UMA support to OAuth2 consumer and upstream plugin

Consider the diagram below

image

Sequence Diagrams:

Notes:

  • Client must explicity specify whether it is OAuth, UMA or Mix mode.
  • In Mix Mode there is no support for claims gathering--need_info response is suppressed.
  • In Mix Mode, UMA RS Plugin tries to obtain RPT for client and caches it
  • In Mix Mode, OAuth Client plugin checks for an associated RPT token, and if present replaces the OAuth token with the RPT token.

Python script - installation failed.

Looks like error at the npm part.

Configuring postgres...
ALTER ROLE
CREATE DATABASE
CREATE DATABASE
Installing konga node packages...
Creating konga oxd client used to call oxd-https endpoints...
Installation failed. See:
  gluu-gateway-setup.log
  gluu-gateway-setup_error.log
for more details.

Error log:
gluu-gateway-setup_error.log

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.