Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

External IdP validation feature for API Backends #401

Open
wants to merge 32 commits into
base: main
Choose a base branch
from

Commits on Oct 26, 2017

  1. The configuration file was modified to include two additional fields …

    …inside of the gatekeeper configuration for managing token validation with FIWARE Wilma PEP Poxy, this fields allow to define the PEP proxy host and port to establish the connection. The caching option was changed to false because the token validation option doesn't allow caching yet.
    
    Also, the error messages defined in the api settings were changed for including token as other validation method.
    anmunoz committed Oct 26, 2017
    Configuration menu
    Copy the full SHA
    ba64ff2 View commit details
    Browse the repository at this point in the history
  2. In this file, I include two more nginx server variables for checking …

    …the word "token" in the url and the header "X-Auth-Token" in the requests made to the platform. With this change is possible to manage and differentiate if the user made a request using an API_Key or OAuth Token
    anmunoz committed Oct 26, 2017
    Configuration menu
    Copy the full SHA
    6c1280e View commit details
    Browse the repository at this point in the history
  3. This file was modified for including the token validation, the method…

    …s allowed to pass the token are by param and header. The variable api_key was changed by a key, value table, this table has two values, fist the key_value that stores the value of the api_key or the token, and the second value called key_type which stores the type of key provided by the user, it can take two values token or api_key
    
    All the variables that previously stored the api_key value, was changed to store api_key ["key_value"], that represents exactly the same value using the new api_key table.
    anmunoz committed Oct 26, 2017
    Configuration menu
    Copy the full SHA
    254988b View commit details
    Browse the repository at this point in the history
  4. This function usually is used for inverting the roles table, it was m…

    …odified to allow and parse a roles tables that have more than one value by rol, for example: if the function receives the roles in this format Roles":[{"name":"rol1","id":"16"}].
    
    With the modification the function checks if the roles value has more than one value and takes only the value for the key "name" ant after that invert the table.
    anmunoz committed Oct 26, 2017
    Configuration menu
    Copy the full SHA
    0554070 View commit details
    Browse the repository at this point in the history
  5. This function allows to connect with the Pep Proxy service for checki…

    …ng if the token is valid and retrieve the user information. The function takes the PEP Proxy host and port as parameters and sends a request with the header X-Auth-Token and the value of the token provided by the user.
    
    If the token is valid, PEP proxy sends a response with the user information asociated to the token, otherwise, it sends a message indicating the result of the validation process with his status, 404 , 402, etc.
    anmunoz committed Oct 26, 2017
    Configuration menu
    Copy the full SHA
    07e2aa5 View commit details
    Browse the repository at this point in the history
  6. The user_store function was modified for including the token validati…

    …on, for achieving this, an extra validation through the key_type value of the api_key variable was used. If the key_value is equal to "api_key", the key_value is checked in the Mongo database. In case of the value of key_values is equal to "token", the token is sent to the PEP Proxy for validation, if the token is valid, the user information is returned.
    
    If the user information is retrieved from the database this information is stored in the variables of the platform as usually did. In case that the user information was retrieved using token validation, the variables the Nick_name is assigned to the user_id and the Roles is assigned to the roles of the platform.
    Moreover, if the user information coming from of the token validation with PEP Proxy doesn't have the value of "email", this field is stored in the platform using the Nick_name value, this value is needed for displaying, the user associated with each request in the Analytics option of the web app . The rest of the changes are related to the reassignment of the api_key variable using api_key ["key_value"]
    anmunoz committed Oct 26, 2017
    Configuration menu
    Copy the full SHA
    bbf9f0b View commit details
    Browse the repository at this point in the history
  7. Merge pull request #1 from ging/token_validation

    New feature for OAuth2 Token Validation using Fiware Wilma PEP-Proxy, v0.1 OAuth2 authentication with FIWARE Pep Proxy only, next version need to allow OAuth2 token validation with any authentication service provider
    anmunoz authored Oct 26, 2017
    Configuration menu
    Copy the full SHA
    f0839eb View commit details
    Browse the repository at this point in the history

Commits on Nov 7, 2017

  1. Configuration menu
    Copy the full SHA
    0e86c30 View commit details
    Browse the repository at this point in the history
  2. Merge pull request #2 from ging/revert-1-token_validation

    Revert "New feature for OAuth2 Token Validation using Fiware Wilma PEP-Proxy"
    anmunoz authored Nov 7, 2017
    Configuration menu
    Copy the full SHA
    8f57775 View commit details
    Browse the repository at this point in the history

Commits on Nov 13, 2017

  1. The configuration file was modified to include one additional field …

    …inside of the gatekeeper configuration for managing token validation with externals Identity Providers (Fiware, Google, Github, Facebook).
    
     The caching option was changed to false because the token validation option doesn't allow caching yet.
    
    Also, the error messages defined in the api settings were changed for including token as other validation method.
    anmunoz committed Nov 13, 2017
    Configuration menu
    Copy the full SHA
    a0166f4 View commit details
    Browse the repository at this point in the history
  2. In this file, I include two more nginx server variables for checking…

    … the word "token" in the url and the header "X-Auth-Token" in the requests made to the platform. With this change is possible to manage and differentiate if the user made a request using an API_Key or OAuth2 Token
    anmunoz committed Nov 13, 2017
    Configuration menu
    Copy the full SHA
    99fb1b0 View commit details
    Browse the repository at this point in the history
  3. This function usually is used for inverting the roles table, it was …

    …modified to allow and parse a roles tables that have more than one value by rol, for example: if the function receives the roles in this format Roles":[{"name":"rol1","id":"16"}].
    
    With the modification the function checks if the roles value has more than one value and takes only the value for the key "name" and after that, the function inverts the table.
    anmunoz committed Nov 13, 2017
    Configuration menu
    Copy the full SHA
    1ead407 View commit details
    Browse the repository at this point in the history
  4. This function allows to connect with an IdP service (Google, Facebook…

    …, Fiware, Github) for checking if a token is valid and retrieve the user properties. The function takes the token provided by the user and the IdP provider registered in the api-backend for checking if the token is valid making a validation request to the corresponding IdP. If the token is valid, the user information stored in the IdP is retrieved.
    anmunoz committed Nov 13, 2017
    Configuration menu
    Copy the full SHA
    ae7143b View commit details
    Browse the repository at this point in the history
  5. This file was modified for including the token validation, the method…

    …s allowed to pass the token are by param and header. The variable api_key was changed by a key, value table, this table has three elements, first the key_value that stores the value of the api_key or the token, the second value called key_type which stores the type of key provided by the user, it can take two values token or api_key and, Finally, the las element named "idp" has a value that indicates if and which external IdP has the associated the requested api-backend.
    
    All the variables that previously stored the api_key value, was changed to store api_key ["key_value"], that represents exactly the same value using the new api_key table.
    anmunoz committed Nov 13, 2017
    Configuration menu
    Copy the full SHA
    0eacb11 View commit details
    Browse the repository at this point in the history
  6. The user_store function was modified for including the token validat…

    …ion, for achieving this, an extra validation through the key_type value of the api_key variable was used. If the key_value is equal to "api_key", the key_value is checked in the Mongo database. In case of the value of key_values is equal to "token", the token is sent to the IdP validation with the corresponding api_key["idp"] value for sending a validation request directly to the IdP associated to the api-backend, if the token is valid, the user information is returned.
    
    If the user information is retrieved from the database this information is stored in the variables of the platform as usually did. In case that the user information was retrieved using token validation and the IdP was Fiware, the variables the id is assigned to the user_id and the Roles is assigned to the roles of the platform.
    
    In case of the other externals IdP, the name and the email of the user are retrieved only.
    
    The rest of the changes are related to the reassignment of the api_key variable using api_key ["key_value"]
    anmunoz committed Nov 13, 2017
    Configuration menu
    Copy the full SHA
    ac81453 View commit details
    Browse the repository at this point in the history

Commits on Nov 14, 2017

  1. Correcting validation mistake for allowing access to the api backend …

    …using api_key or token even when an IdP has been associated to that API backend
    anmunoz committed Nov 14, 2017
    Configuration menu
    Copy the full SHA
    739c99e View commit details
    Browse the repository at this point in the history

Commits on Feb 13, 2018

  1. Configuration menu
    Copy the full SHA
    80bb4fb View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    58cc570 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    79c4a43 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    cecb00d View commit details
    Browse the repository at this point in the history

Commits on Feb 14, 2018

  1. Configuration menu
    Copy the full SHA
    1e561c7 View commit details
    Browse the repository at this point in the history
  2. Pre-merge

    anmunoz committed Feb 14, 2018
    Configuration menu
    Copy the full SHA
    0574328 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    93fa85c View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    0ee3b3d View commit details
    Browse the repository at this point in the history
  5. Correcting the documentation

    anmunoz committed Feb 14, 2018
    Configuration menu
    Copy the full SHA
    fb48514 View commit details
    Browse the repository at this point in the history

Commits on Feb 26, 2018

  1. documentation update

    anmunoz committed Feb 26, 2018
    Configuration menu
    Copy the full SHA
    a1d583c View commit details
    Browse the repository at this point in the history

Commits on Mar 6, 2018

  1. Configuration menu
    Copy the full SHA
    d52a594 View commit details
    Browse the repository at this point in the history

Commits on Mar 19, 2018

  1. Configuration menu
    Copy the full SHA
    678b1d5 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    1f108d9 View commit details
    Browse the repository at this point in the history

Commits on Oct 8, 2018

  1. adding new type of requests for FIWARE IDP, now is possible to work i…

    …n mode authentication and authorization, for these reasons the request to the IDM are different. For authentication the url needs to include the token and the app-ID and for authorization is needed to include, token, action, resource and app-ID
    anmunoz committed Oct 8, 2018
    Configuration menu
    Copy the full SHA
    cf69008 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    ee9b3b8 View commit details
    Browse the repository at this point in the history
  3. correction config.yml

    anmunoz committed Oct 8, 2018
    Configuration menu
    Copy the full SHA
    b58c352 View commit details
    Browse the repository at this point in the history