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

New admin interface. Internal API Key registration/removal request page. #1263

Open
wants to merge 5 commits into
base: dev
Choose a base branch
from

Conversation

dmytrotsko
Copy link
Contributor

@dmytrotsko dmytrotsko commented Aug 16, 2023

Summary:

Replaced old admin endpoint with Flask-Admin lib.
Added new internal endpoints for API Key registration and removal request. Added two new tables to track registration/removal requests. Moved /diagnostics route to the main.py.
Added general send_email function to the _common.py and reused it for sending emails in places where it is needed.

Prerequisites:

  • Branch is up-to-date with the branch to be merged with, i.e. dev
  • Build is successful
  • Code is cleaned up and formatted

To open admin page, first you need to login with admin password (/login endpoint). After that you will be redirected to the admin page.

Added new internal endpoints for API Key registration and removal request.
Added two new tables to track registration/removal requests.
Moved /diagnostics route to the main.py.
Added general `send_email` function to the _common.py and reused it for sending emails in places where it is needed.
src/server/main.py Fixed Show fixed Hide fixed
@sonarcloud
Copy link

sonarcloud bot commented Sep 7, 2023

SonarCloud Quality Gate failed.    Quality Gate failed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot E 7 Security Hotspots
Code Smell A 2 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

idea Catch issues before they fail your Quality Gate with our IDE extension sonarlint SonarLint

@sonarcloud
Copy link

sonarcloud bot commented Oct 30, 2023

SonarCloud Quality Gate failed.    Quality Gate failed

Bug A 0 Bugs
Vulnerability E 1 Vulnerability
Security Hotspot E 7 Security Hotspots
Code Smell A 2 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

idea Catch issues before they fail your Quality Gate with our IDE extension sonarlint SonarLint

Copy link

sonarcloud bot commented Jan 12, 2024

Quality Gate Failed Quality Gate failed

Failed conditions

7 Security Hotspots
E Security Rating on New Code (required ≥ A)

See analysis details on SonarCloud

idea Catch issues before they fail your Quality Gate with our IDE extension SonarLint SonarLint

'serving_host': serving_host,
'database_host': db_host,
}
return make_response(json.dumps(response_data), 200, {'content-type': 'text/plain'})

Check failure

Code scanning / SonarCloud

Endpoints should not be vulnerable to reflected cross-site scripting (XSS) attacks High

Change this code to not reflect user-controlled data. See more on SonarCloud
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant