Skip to content

yrmi99/Apache-Airavata-Custos-Application

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

54 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Apache-Airavata-Custos-Application

Temporary Git with Kripa's UI changes: https://github.com/ZhenmeiOng/temp-repo/tree/kripa

Front-End: React Back-End: Node.js/Express.js

  1. clone this repository

Running front end:

  1. cd to custos directory
  2. npm start

Running back end server:

  1. cd to 'backend' directory
  2. 'node server.js'

To access app

  1. Press Log in Button
  2. Log in to CILogon through GT or another institution
  3. You will arrive at a user details screen with your name and email
  4. An Add Content button is accessible to access the Backend API Server

Custos Implementation

Custos authentication occurs when the user clicks the log in button on the front page. This authentication logic occurs in authLogin.tsx and is done with a library ("react-oauth2-code-pkce") The library calls the /authorize endpoint and redirects to CILogon for secure log-in. After logging in, the /token endpoint is called and a token is provided to allow for authorized actions.

Access Control

Access control is based on the GBAC model. After authenticating the user, a main details page is presented with the user's name and email. An "Add Content" button is also there. This "Add Content" button involves the backend server API and the access control. To add content, the front-end sends a api request to the backend for a response with success. To send the api call, the user's groups are checked by calling the /userinfo endpoint. This provides the user's groups and scopes. If the user is in the group "Adminsss", they are able to add content; however, if not, they are told they do not have access to the it.

Walkthrough video for Milestone 3:

There are two demonstrations in the video.

    • First part demonstrates the user(admin) trying to add content without having the server running.
    • This will shows an error message saying "Failed to connect to server"
    • Second part demonstrates a non-admin user trying to add content. (but with server running in the background)
    • This will shows error message saying "You do not have access to the control"

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •