Git Product home page Git Product logo

airavata-custos-portal's Introduction

Airavata Custos Portal

Getting started with running locally

.env file

Assuming you are running Custos locally (see https://github.com/apache/airavata-custos/tree/develop#quickstart), edit the .env file to match the client id and secret generated by the Custos bootstrap service:

CUSTOS_CLIENT_ID="custos-s8qf9g3odbbcdsgd2khv-10000000"
CUSTOS_CLIENT_SEC="..."
CUSTOS_API_URL="http://localhost:10000"
CUSTOS_SUPER_CLIENT_ID="custos-s8qf9g3odbbcdsgd2khv-10000000"

Running the frontend

You need Node.js 14 and Yarn 1 installed.

yarn install
yarn run serve

Running the Django server

You need Python 3.9+.

python -m venv venv
source venv/bin/activate
pip install -r requirements.txt
./manage.py migrate
./manage.py runserver

How to use as a Django app

Airavat custos portal is available as a python package to install and customise for tenants needs. The forllowing instructions are for setting up a customised portal using all the features available in the airavata custos portal.

  1. Install
pip install airavata-custos-portal
  1. Create a Django app
django-admin startproject my_first_custos_app .
cd my_first_custos_app
django-admin startapp apps
cd apps
django-admin startapp frontend
  1. Include the custos portal api and frontend in the urls.
# my_first_custos_app/apps/frontend/urls.py

from django.contrib import admin
from django.urls import path
from django.conf.urls import include

urlpatterns = [
    path('admin/', admin.site.urls),
    path("api/", include("airavata_custos_portal.apps.api.urls")),
    path("", include("airavata_custos_portal.apps.frontend.urls")),
]
  1. Also, include the custom UI app in the urls.
# my_first_custos_app/apps/frontend/urls.py

from django.contrib import admin
from django.urls import path
from django.conf.urls import include

urlpatterns = [
    path('admin/', admin.site.urls),
    path("api/", include("airavata_custos_portal.apps.api.urls")),
    path("", include("airavata_custos_portal.apps.frontend.urls")),
    path("custom-ui/", include("my_first_custos_app.my_custom_ui.urls")),
]

Development

The application consists of a Vue.js frontend and a Django based backend. The instructions below are for setting up the local setup for development.

Change the configurations

Change the environment variables on .env

Run Vue.js app

yarn install
yarn serve

Lints and fixes files

yarn lint

Running the Django server locally

python -m venv venv
source venv/bin/activate
pip install -r requirements.txt
./manage.py migrate
./manage.py runserver

And then point to http://localhost:8000

How to publish

  1. Build the static files
yarn build
  1. Build the python package
python -m pip install --upgrade build
python -m build
  1. Publish the python package to pypi.org. Optionally can push to test.pypi.org. See https://packaging.python.org/tutorials/packaging-projects/ for more info.
python -m pip install --upgrade twine
python -m twine upload dist/*

airavata-custos-portal's People

Contributors

dinukadesilva avatar isururanawaka avatar machristie avatar sannidhi09 avatar smarru avatar

Watchers

 avatar  avatar  avatar

airavata-custos-portal's Issues

Implement email verification for local portal accounts

Description

When new local accounts are created in the portal have the user emails verified.

Steps to Reproduce

Expected Behaviour

  1. Email from the portal to be sent to the provided e-mail with a link to verify the email provided.
  2. Currently as soon as the account is created, user can login to the portal.

Your Environment

https://demo.gateway.custos.scigap.org/

  • Custos branch or release version used:
  • Operating system and version:

Additional Context

For an admin user all the groups get listed in Manage Groups. There should be a separate section/tab to view the list of own groups and groups the user is a member of

Description

For an admin user all the groups get listed in Manage Groups. There should be a separate section/tab to view the list of own groups and groups the user is a member of. Now since the whole list is together its little difficult. Also the group list can quickly grow for the gateway and should have a way to search and filter as well for an admin user.

Steps to Reproduce

Expected Behaviour

Your Environment

https://testdrive.usecustos.org/

  • Custos branch or release version used:
  • Operating system and version:

Additional Context

Changing group users role from admin to member, threw an error. But the action seem to carried out well in the page

Description

A normal end user in the portal changed the role of a user in one of the oen groups. An error thrown

Steps to Reproduce

  1. Login as a normal end user
  2. Createa group and add an user with admin role
  3. Save
  4. Then again select the above user and change the role to member and update.
  5. Page shows the role as member now but error thrown in the backend.

Screen Shot 2020-10-13 at 8 43 32 PM

Expected Behaviour

Your Environment

https://testdrive.usecustos.org/

  • Custos branch or release version used:
  • Operating system and version:

Additional Context

ModuleNotFoundError: No module named 'grpc' while running the Django server

Hi , I am trying to run custos portal in local machine (Mac) and facing the below error while running the Django server in 4th step of readme.

Traceback (most recent call last):
File "/Users/akhil/Documents/CUSTOS/airavata-custos-portal/venv/lib/python3.6/site-packages/django/core/management/base.py", line 328, in run_from_argv
self.execute(*args, **cmd_options)
File "/Users/akhil/Documents/CUSTOS/airavata-custos-portal/venv/lib/python3.6/site-packages/django/core/management/commands/runserver.py", line 60, in execute
super().execute(*args, **options)
File "/Users/akhil/Documents/CUSTOS/airavata-custos-portal/venv/lib/python3.6/site-packages/django/core/management/base.py", line 369, in execute
output = self.handle(*args, **options)
File "/Users/akhil/Documents/CUSTOS/airavata-custos-portal/venv/lib/python3.6/site-packages/django/core/management/commands/runserver.py", line 67, in handle
if not settings.DEBUG and not settings.ALLOWED_HOSTS:
File "/Users/akhil/Documents/CUSTOS/airavata-custos-portal/venv/lib/python3.6/site-packages/django/conf/init.py", line 76, in getattr
self._setup(name)
File "/Users/akhil/Documents/CUSTOS/airavata-custos-portal/venv/lib/python3.6/site-packages/django/conf/init.py", line 63, in _setup
self._wrapped = Settings(settings_module)
File "/Users/akhil/Documents/CUSTOS/airavata-custos-portal/venv/lib/python3.6/site-packages/django/conf/init.py", line 142, in init
mod = importlib.import_module(self.SETTINGS_MODULE)
File "/Users/akhil/.pyenv/versions/3.6.0/lib/python3.6/importlib/init.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 978, in _gcd_import
File "", line 961, in _find_and_load
File "", line 936, in _find_and_load_unlocked
File "", line 205, in _call_with_frames_removed
File "", line 978, in _gcd_import
File "", line 961, in _find_and_load
File "", line 950, in _find_and_load_unlocked
File "", line 655, in _load_unlocked
File "", line 678, in exec_module
File "", line 205, in _call_with_frames_removed
File "/Users/akhil/Documents/CUSTOS/airavata-custos-portal/custos_portal/custos_portal/init.py", line 1, in
from clients.identity_management_client import IdentityManagementClient
File "/Users/akhil/Documents/CUSTOS/airavata-custos-portal/venv/lib/python3.6/site-packages/clients/identity_management_client.py", line 19, in
import grpc
ModuleNotFoundError: No module named 'grpc'

Searching for users with Username is not working for users in DEACTIVE state

Description

In Manage Users page, searching for a username by giving part of the name is not working. Incorrect users are filtered and listed.

Steps to Reproduce

  1. Navigate to the Manage Users page
  2. Enter string 'er' and click search
  3. The page indicates it searches the username by the given string.
  4. The retrieved user doesn't have those letters in the username.
  5. It is also not searching for the firstname, because there are multiple users with 'er' in the firstname but they are not listed

Search-users

.

Expected Behaviour

Your Environment

https://demo.gateway.custos.scigap.org/

  • Custos branch or release version used:
  • Operating system and version:

Additional Context

Admin can delete uma_authorization and offline_access from end user profile, and it thorws an error in the backend

Description

Gateway admin in Manage Users can delete both uma_authorization and offline_access roles from the frontend which throws errors. Should the admin be able to remove these base roles?

Steps to Reproduce

  1. Navigate to Manage Users as admin
  2. Select a user with above 2 roles
  3. Delete both roles

Expected Behaviour

Base roles should not be able to delete.
Screen Shot 2020-10-09 at 8 33 36 AM

Your Environment

https://demo.gateway.custos.scigap.org/

  • Custos branch or release version used:
  • Operating system and version:

Additional Context

Admin user generates a SSH key and shared with an end user. This key does not get listed in end user's Sharing list

Description

Admin user shares a SSH key but does not appear in the shared users Sharing list.

Steps to Reproduce

  1. Admin user logs in and generates a key
  2. From Manage sharing, the key was shared with an end user
  3. When the end user logs in, that key does not appear. So the end user does not know a key has been shared.

Screen Shot 2020-10-09 at 7 44 52 PM

Screen Shot 2020-10-09 at 7 44 43 PM

Screen Shot 2020-10-09 at 7 44 52 PM

Expected Behaviour

Your Environment

https://demo.gateway.custos.scigap.org/

  • Custos branch or release version used:
  • Operating system and version:

Additional Context

Email notification to portal admins and portal users

Description

Email notification to portal admins when new user accounts are created.
Email notifications to the user when their user role changes, when they are added to group or changes take place to their user profile.

Steps to Reproduce

Expected Behaviour

Your Environment

https://demo.gateway.custos.scigap.org/

  • Custos branch or release version used:
  • Operating system and version:

Additional Context

Error while performing UI operations (example :- User Registration )

I am able to implement all the mentioned steps in the read.me and was able to access the custos portal UI But unable to implement any of the operations from the user interface like user registration , login and given the below mentioned error in UI

__InactiveRpcError at /auth/create-account
<_InactiveRpcError of RPC that terminated with:
status = StatusCode.UNAVAILABLE
details = "failed to connect to all addresses"
debug_error_string = "{"created":"@1592695499.255713000","description":"Failed to pick subchannel","file":"src/core/ext/filters/client_channel/client_channel.cc","file_line":3962,"referenced_errors":[{"created":"@1592695419.144353000","description":"failed to connect to all addresses","file":"src/core/ext/filters/client_channel/lb_policy/pick_first/pick_first.cc","file_line":394,"grpc_status":14}]}"

_

Password policies for the portal user password.

Description

The password is currently any string user provides. Please have password policies in place. e.g.: password to contain at least 8 characters with one upper case, special character, number.

Steps to Reproduce

  1. When creating a local account give 1234 as the password and it gets created.

Expected Behaviour

Your Environment

https://demo.gateway.custos.scigap.org/

  • Custos branch or release version used:
  • Operating system and version:

Additional Context

Implement portal username policies - e.g: UserName to contain only lowercase letters and numbers

Description

A new user account is created with !@#$%^ as the username. When the account was created, it got created but cannot login with it. Throws an error.
The Portal needs to have policies for usernames.
When logged in using the above username the errors are thrown.
NOTE: # ( Describe the problem you're encountering. )

Steps to Reproduce

  1. Go to create account page
  2. Give !@#$%^ as the username
  3. Provide other details and click Create Account.

Expected Behaviour

Should have username policies. Should not let users create usernames containing any character.
NOTE: # ( Tell us what you did and what you expected to happen and what you instead saw. )

Your Environment

https://demo.gateway.custos.scigap.org/
Screen Shot 2020-10-07 at 1 47 56 AM

  • Custos branch or release version used:
  • Operating system and version:

Additional Context

In account creation, the fields should have maximum lengths defined

Description

When users are creating local accounts in the portal, the create account page should have maximum and minimum lengths for the fields. This way unnecessary long usernames and extremely short passwords and empty first name and last name can be avoided.
Also, the fields will not exceed the DB table column length as well.

Steps to Reproduce

  1. Provide extra lengthy username and create an account.

Expected Behaviour

Your Environment

https://demo.gateway.custos.scigap.org/

  • Custos branch or release version used:
  • Operating system and version:

Additional Context

README Guide

Write project metadata and detailed documentation in the readme with clear directions for reporting issues, documentation, installation, usage, samples.

In addition, provide details on project governance, contributing and license information.

In Edit mode (e.g. editing user profile) error thrown when tires to save without first name, last name and email

Description

Users should not be allowed to remove mandatory details and update.
Error thrown in the back but the page doesn't display it.

In general, users should not be able to update or save changes when the mandatory fields are empty.

Steps to Reproduce

  1. End user login to the portal
  2. Navigate to Manage uses
  3. Remove first name, last name and email
  4. Click Update Profile

Expected Behaviour

Update Profile button should not be enabled.

Your Environment

https://demo.gateway.custos.scigap.org/

  • Custos branch or release version used:
  • Operating system and version:

Additional Context

Screen Shot 2020-10-08 at 1 46 09 PM

Ability to add multiple users at once to a group wit the role of admin or member.

Description

Currently when adding users to a group, need to add them one by one.
Method to search and add users at once.
Listing users as we are doing now is not user friendly. We should have a way of searching for users, especially when a gateway would have hundreds or thousands of users.

Maybe the users would implement this in their portal but we should support it within the API.

Steps to Reproduce

Expected Behaviour

Your Environment

https://demo.gateway.custos.scigap.org/

  • Custos branch or release version used:
  • Operating system and version:

Additional Context

When creating the Entities in Sharing, user should not enter the ID. It should be system generated

Description

In the portal user is to add the entity ID. This can lead to errors where user may try to add the same ID multiple times. In such occasion there is an error thrown in the backend.

The ID should be system generated so it will be unique.

Steps to Reproduce

  1. Login as a end-user
  2. Add entity with ID 'test'
  3. Save above entity
  4. Try to add another entity with ID 'test'
  5. No error displayed in the UI but error thrown

Screen Shot 2020-10-08 at 6 41 05 PM

in the back. [NOTE]: # ( Include details description or commands to reproduce. )

Expected Behaviour

Your Environment

https://demo.gateway.custos.scigap.org/

  • Custos branch or release version used:
  • Operating system and version:

Additional Context

When login in with CiLogon first name and last names are switched. Also an error is thrown "Cannot read property 'first_name'"

Description

First name and last name switched when login in with institute credentials.
But was able to get access to the portal without any issue.

Experienced the same when tried gmail through CILogon as well. Image attached with the error
Screen Shot 2020-10-09 at 8 47 32 AM

Steps to Reproduce

  1. In the portal click Login with Institution
  2. Select the institute
  3. Errors are thrown when logged in
  4. In Manage users, can view the name switch.

Expected Behaviour

Your Environment

https://demo.gateway.custos.scigap.org/

  • Custos branch or release version used:
  • Operating system and version:

Additional Context

Screen Shot 2020-10-08 at 3 57 42 PM

For end users Manage User page should not display all the users.

Description

Manage Users page in the portal lists all the users in the portal irrespective of the role they have.
For end-users, this page should only show their own details to update.
For admin users page should list all the users.

Steps to Reproduce

In the portal navigate to the Manage Users while in nd user role.

Expected Behaviour

Your Environment

https://demo.gateway.custos.scigap.org/

  • Custos branch or release version used:
  • Operating system and version:

Additional Context

Error when trying to add groups while logged in with CILogin

After logging in with CILogin, if the user attempts to add a group, they receive a "Group name not available" error.

Steps to recreate:

  1. Login with CILogin
  2. Navigate to "Manage Groups" section
  3. Attempt to add group using various group names and descriptions

group name error

In Manage Users page, users with admin role should not be able to change custos admin status

Description

When a portal user with admin role visits the Manage Users page, all the portal users are listed.
The admin user can change the status of the custos-admin (Super admin).
This need to be restricted.

Steps to Reproduce

  1. Log in to portal with admin role.
  2. Change the status to DEACTIVE for custos-admin.
  3. THe status changes and the custos admin cannot login.

Expected Behaviour

Your Environment

https://demo.gateway.custos.scigap.org/

  • Custos branch or release version used:
  • Operating system and version:

Additional Context

SSH key generation appears to takes a long time, but when the page is refreshed it's listed and actually generated.

Description

SSH key seem to be getting generated for long time but when the page was refreshed, it actually got listed and seem to be generated.

Steps to Reproduce

  1. Login as end user and select Manage Secret
  2. Click Add Secret
  3. Type SSH and provide Description
  4. Click on Add
  5. THe processing icon keep spinning for a long time, long than 5 minutes
  6. Then refreshed the link, the key just got lsited.
  7. Didnt see any errors but something seems to be either slow or delayed.

Expected Behaviour

Your Environment

https://demo.gateway.custos.scigap.org/

  • Custos branch or release version used:
  • Operating system and version:

Additional Context

Confusion - Not even sure whether its correct. Why when sharing SSH key generated by a user with others get listed as multiple records with different owner IDs?

Description

End user generates 2 SSH keys and a password using Manage Secret appears in Sharing as Entities and in Sharing.
When sharing the SSH key with multiple users, a new record gets added to the Sharing section with different Owner ID.
But shouldn't the owner ID be the same as its owned by the user who generated it?

Steps to Reproduce

  1. Login as a end user
  2. Go to Manage Sharing
  3. Generate 2 SSH keys and a passwrod
  4. Navigate to Sharing
  5. All 3 listed as Entities and under Sharing (although I didnt share with anyone)
  6. Select a key and share with 2 other users.
  7. Now the same key is listed multiple times un der Sharing with different usrnames as the Owner ID
  8. Shouldn't the user who generated be the Owner ?

Screen Shot 2020-10-09 at 7 29 09 PM

Expected Behaviour

Your Environment

https://demo.gateway.custos.scigap.org/

  • Custos branch or release version used:
  • Operating system and version:

Additional Context

Have the buttons disabled in the portal till mandatory fields are filled

Description

Across the portal, the mandatory fields are not indicated (you can add a * to the field) and no they are validated upon saving. This results empty records getting added to the portal. Experienced this in generating a secret, creating permission, etc
To avoid, have the buttons disabled until required fields are filled.

Steps to Reproduce

Expected Behaviour

Your Environment

https://demo.gateway.custos.scigap.org/

  • Custos branch or release version used:
  • Operating system and version:

Additional Context

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.