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

Refactor system to support test mode #853

Open
dvstans opened this issue Oct 21, 2022 · 1 comment
Open

Refactor system to support test mode #853

dvstans opened this issue Oct 21, 2022 · 1 comment
Labels
Component: Build Related to the build system Component: Core Relates to core service Component: Database Relates to database microservice / data model Component: Web UI Relates to web appp user interface

Comments

@dvstans
Copy link
Collaborator

dvstans commented Oct 21, 2022

The primary goal of a test mode is to permit unit testing within an isolated host. The main impact of this is that Globus authentication cannot be supported in this case due to requiring an Internet-accessible web service with a stable IP/domain name. For this reason, test mode will disable globus auth and instead use basic auth against DataFed's own user registry. It will also allow new user registration without Globus.

This change impacts the web service primarily, but specific changes may be needed in the DB microservice. For example, user access functions typically expect Globus UUIDs. It may be possible to "fake" certain aspects of this, but deeper analysis is required.

It is important that any affected source code does NOT use conditional execution based on the running mode. This is to prevent test code from being deployed to production. To achieve this, the build system must compile, package, and deploy slightly different sets of files (normal vs test). Affected code must be modularized to make this possible (i.e. separate directories containing normal vs test versions). Proper abstractions must be used to prevent complexity and maintenance issues (i.e. keep test code completely separate from non-test code, rather than co-mingled).

@dvstans dvstans added Task Component: Web UI Relates to web appp user interface Component: Database Relates to database microservice / data model Component: Core Relates to core service Component: Build Related to the build system labels Oct 21, 2022
@dvstans dvstans removed the Task label Nov 1, 2022
@dvstans
Copy link
Collaborator Author

dvstans commented Dec 7, 2022

Update. This is implemented and test-mode auth works; however, have not been able to test that normal Globus auth still works correctly yet.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: Build Related to the build system Component: Core Relates to core service Component: Database Relates to database microservice / data model Component: Web UI Relates to web appp user interface
Projects
None yet
Development

No branches or pull requests

2 participants