Code Monkey home page Code Monkey logo

ego's Introduction

Ego - Authentication and Authorization Microservice

ego-logo

Biomedical data requires secure protocols for authenticating users and authorizing the information and applications those users can access. Ego addresses this by facilitating user registration and providing a secure permission management system. An Ego UI was also developed to make these services accessible to all collaborators.


Ego is a core component within the Overture research software ecosystem. Overture is a toolkit of modular software components made to build into scalable genomics data management systems. See our related products for more information on what Overture can offer.

Technical Specifications

Documentation

  • See our Developer wiki
  • For our user installation guide see our website here
  • For administrative guidance see our website here

Docker Setup

This is a step-by-step guide for setting up a dockerized version of Ego.

  1. Set up a google oauth client app. See here for more details
  • Note it may take 5 minutes to a few hours for settings to take effect
  1. Clone or Download the repository and update the docker-compose-all.yml file with your client id and secret
spring.security.oauth2.client.registration.google.clientId : "<insert-provided-client-Id>"
spring.security.oauth2.client.registration.google.clientSecret: "<insert-provided-clientSecret>"
  1. Open Docker desktop and then run the following command from your CLI
docker-compose -f docker-compose-all.yml up 
  1. Ego requires seed data to authorize the Ego UI as a client using the following command

Alternatively if you have Make installed you can run make init-db

docker exec ego-postgres-1  psql -h localhost -p 5432 -U postgres -d ego --command "INSERT INTO EGOAPPLICATION (name, clientId, clientSecret, redirectUri, description, status, errorredirecturi) VALUES ('ego ui', 'ego-ui', 'secret', 'http://localhost:8080/', '...', 'APPROVED', 'http://localhost:8080/error') on conflict do nothing"
  1. You can now access the Ego UI through http://localhost:8080/ego-ui
  • This will require your google sign in
  • Once signed in you will have access to the admin dashboard
  • The Ego swagger ui can be located at http://localhost:8080/swagger-ui.html

Support & Contributions

Related Products

Overture overview

Overture is an ecosystem of research software tools, each with narrow responsibilities, designed to address the adapting needs of genomics research.

The Overture Data Management System (DMS) is a fully functional and customizable data portal built from a packaged collection of Overture's microservices. For more information on DMS, read our DMS documentation.

See the links below for additional information on our other research software tools:


Software Description
Ego An authorization and user management service
Ego UI A UI for managing Ego authentication and authorization services
Score Transfer data to and from any cloud-based storage system
Song Catalog and manage metadata associated to file data spread across cloud storage systems
Maestro Organizing your distributed data into a centralized Elasticsearch index
Arranger A search API with reusable UI components that build into configurable and functional data portals
DMS-UI A simple web browser UI that integrates Ego and Arranger

ego's People

Contributors

alekspejovic avatar alubneuski avatar andricdu avatar anncatton avatar azher2ali avatar blabadi avatar buwujiu avatar d8660091 avatar dankolbman avatar dependabot[bot] avatar fgerthoffert avatar henro001 avatar hlminh2000 avatar jephuff avatar joneubank avatar jongdevops avatar justincorrigible avatar kcullion avatar kevinfhartmann avatar leoraba avatar lepsalex avatar mitchellshiell avatar rosibaj avatar rtisma avatar yalturmes 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

Watchers

 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

ego's Issues

Ego UUID Change

Generate UUID for new users (UUID-5) based on user name and login-provider.

Could be dependant on changes enabling multiple providers: #24

Add Studies as a new Entity type

There was discussion about making Studies a first class entity that Ego tracks.

We should work out user stories, use cases, and attempt a first pass at implementing this to see if it accomplishes what we want it to accomplish.

Client Credentials flow is broken

In Auth profile: the /token endpoint shouldn't expect an auth code to be passed
In Default profile: Need to debug why CorsFilter gives this error:

	at org.springframework.security.crypto.password.DelegatingPasswordEncoder$UnmappedIdPasswordEncoder.matches(DelegatingPasswordEncoder.java:238)
	at org.springframework.security.crypto.password.DelegatingPasswordEncoder.matches(DelegatingPasswordEncoder.java:198)
	at org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter$LazyPasswordEncoder.matches(WebSecurityConfigurerAdapter.java:593)
	at org.springframework.security.authentication.dao.DaoAuthenticationProvider.additionalAuthenticationChecks(DaoAuthenticationProvider.java:86)
	at org.springframework.security.authentication.dao.AbstractUserDetailsAuthenticationProvider.authenticate(AbstractUserDetailsAuthenticationProvider.java:166)
	at org.springframework.security.authentication.ProviderManager.authenticate(ProviderManager.java:174)
	at org.springframework.security.web.authentication.www.BasicAuthenticationFilter.doFilterInternal(BasicAuthenticationFilter.java:180)
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)
	at org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:200)
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)
	at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:116)
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)
	at org.springframework.security.web.header.HeaderWriterFilter.doFilterInternal(HeaderWriterFilter.java:66)
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)
	at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:105)
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)
	at org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter.doFilterInternal(WebAsyncManagerIntegrationFilter.java:56)
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)
	at org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:215)
	at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:178)
	at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:357)
	at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:270)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
	at org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:99)
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
	at org.springframework.web.filter.HttpPutFormContentFilter.doFilterInternal(HttpPutFormContentFilter.java:109)
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
	at org.springframework.web.filter.HiddenHttpMethodFilter.doFilterInternal(HiddenHttpMethodFilter.java:81)
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
	at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:200)
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
	at org.overture.ego.security.CorsFilter.doFilter(CorsFilter.java:48)

Adding Application or Group removes the opposite values

  • got to a user that is assigned to a group
  • click edit, add an application, and click save
  • the application is saved, but all groups are removed
  • the same happens in reverse when a user has applications, you add a group, applications will be removes

Cleanup/refactor API

  • Refactor Data Access Layer
  • Add Filters based on User Status
  • Change variable names to snake casing

Logout Button not working

  • logged in with google
  • clicked logout button and nothing happens.
  • if i refresh page, it goes to landing page then initiates login without me clicking anything
  • logout button should log the user out and take them back to homepage

ORCID: Add backend support for ORCID login

Objective

The goal of this ticket is to ensure that ORCID API can be integrated with DMS Portal

Steps to be performed

  1. Add a new button in the login with:
  2. Display the ID logo (see file: https://ndownloader.figshare.com/files/8439047 )
  3. The text is "Log in with ORCID"
  4. User will log in with ORCID.
  5. No window popping: Redirect to the ORCID web site
  6. User will log into ORCID, they will be redirected back to the DMS portal. (/orcid)
  7. User now has the required permission to access the DMS portal.

How to retrieve the email address for the user is still under discussion - [TBD]

Deny /Re-consider page

In case; where the user will denies the permission to the DMS portal for third party authorization, the the following message will appear for the user: "Login has been cancelled. Please try again, or choose another log in method."

image.png

https://wiki.oicr.on.ca/display/icgcargotech/ORCID+Login+Functional+Spec

Zeplin Link

Error conditions: will be managed by ORCID

  1. Email address is empty.
  2. Email address not registered.
  3. Wrong user name and password.

Wiki Link:

https://wiki.oicr.on.ca/pages/viewpage.action?spaceKey=OV&title=ORCID+SSO+Integration

Create close side bar

Feedback: Close the right hand bar when no user/group selected. It looks odd whne you have a list with nothing selected, and some of the table is but off.
screen shot 2018-02-02 at 11 27 50 am

Expected Behaviour:

  • when you first log in it is collapsed
  • when you click on a user or group, it expands with that user,
  • at any point a user can collapse it to view the table better

Add support for encrypting client secrets stored in database.

Right now, when registering a new application, we are storing the clientID and clientSecret of the new application in plaintext. We should be encrypting the secret.

The encryption algo should be AES256. No opinion on which cipher mode should be used.

Right bar does not scroll

  • When on a smaller screen, the white panel on the white panel on the left does not scroll down.
  • it should be scrollable

screen shot 2018-02-02 at 11 18 46 am

Create User not initializing some fields

When you create user, date created is not logged. When a user is created this way, saving any edits or disabling the user does not work. The disable/save buttons will spin indefinitely when clicked in this case.
screen shot 2018-01-03 at 1 25 52 pm
screen shot 2018-01-03 at 1 26 02 pm

Deploy Server API to AWS and use RDS

We want to deploy the ego service to AWS for use in development and we want to make use of the AWS RDS.

  • PostgreSQL support in ego
  • Deploy ego to EC2 instance
  • Provision PostgreSQL in AWS RDS

Continuous Deployment for Ego

  • Enable Ego project in Circle CI
  • Add .circleci/config.yml
  • Add deployment config step for develop branch to demo server
  • Add deployment script configurable via environment variables
  • Add environment variable script template
  • Configure demo server to execute environment variable script

Demoable Ego

The goal of this is to have a publicly available instance of Ego with which any user can log into an play with.

Tasks

  • Allow users to log in and be assigned admin rights
  • Do not persist users logging in to Ego into the Users table (to preserve privacy of users interacting with the demo)
  • Make behavior mentioned above toggle-able from a config value inside the application.yml
  • Script to auto-populate database with dummy users
  • Cronjob that refreshes the user database nightly to clean database of changes from users

Resources

Ego Source Code
Ego UI Source Code

user pagination not working

  • go to users
  • select page 1 on pagination at bottom
  • select page 3 on pagination at bottom. the users are not shifted according to the pagination. Are there really 11 pages of users?
  • Add a user count ( 1-10 of 75 users) to let people know how many users there are

screen shot 2018-01-03 at 1 38 02 pm
screen shot 2018-01-03 at 1 38 14 pm

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.