Skip to content

refactor: enforcing authentication based on environment variable "ENFORCE_AUTH" #1634

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

Merged
merged 6 commits into from
Mar 24, 2025

Conversation

Harsh-Microsoft
Copy link
Contributor

@Harsh-Microsoft Harsh-Microsoft commented Jan 31, 2025

Purpose

Enforcing authentication based on environment variable "ENFORCE_AUTH". Added an environment variable called 'ENFORCE_AUTH'. If the variable is not present or is set to 'true', the authentication message will be displayed on the web app. If the value is set to 'false', the authentication message will be disabled, allowing us to run our Test Automation scripts.

Does this introduce a breaking change?

  • Yes
  • No

How to Test

  • Get the code
git clone [repo-address]
cd [repo-name]
git checkout [branch-name]
npm install
  • Test the code

What to Check

Verify that the following are valid

  • ...

Other Information

@Harsh-Microsoft Harsh-Microsoft changed the title refactor- enforcing authentication based on environment variable "ENFORCE_AUTH" refactor: enforcing authentication based on environment variable "ENFORCE_AUTH" Jan 31, 2025
Copy link

github-actions bot commented Jan 31, 2025

Coverage

Coverage Report •
FileStmtsMissCoverMissing
code
   create_app.py213796%40, 411, 432, 540–542, 547
code/backend/batch/utilities/helpers
   env_helper.py2011194%104, 107–108, 160, 371–373, 395, 400–402
TOTAL382385877% 

Tests Skipped Failures Errors Time
395 0 💤 0 ❌ 0 🔥 54.063s ⏱️

@@ -52,6 +52,13 @@ const Layout = ({ children,toggleSpinner, ...props }: LayoutProps) => {
const firstRender = useRef(true);

const getUserInfoList = async () => {
const isAuthEnforced = await checkAuthEnforced(); // Check if auth is enforced
console.log("isAuthEnforced:", isAuthEnforced);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove this console.log

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

removed

@Avijit-Microsoft Avijit-Microsoft merged commit 6f30b3f into Azure-Samples:dev Mar 24, 2025
6 checks passed
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.

3 participants