-
Notifications
You must be signed in to change notification settings - Fork 93
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
Feature: sovereign clouds #955
base: dev
Are you sure you want to change the base?
Conversation
|
||
const storageKey = 'cloud'; | ||
|
||
export const clouds: ICloud[] = [ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add comment that tells people that this is where new clouds are added
…ftgraph/microsoft-graph-explorer-v4 into feature/sovereign-clouds
SonarCloud Quality Gate failed. |
|
||
const initialState: ICloud = globalCloud; | ||
|
||
export function cloud(state = initialState, action: IAction): ICloud { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Suggestion: Can we add a test for this reducer?
import { IAction } from '../../../types/action'; | ||
import { SET_ACTIVE_CLOUD_SUCCESS } from '../redux-constants'; | ||
|
||
export function setActiveCloud(response: object): IAction { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Suggestion: Can we add a test for this action?
msalApplication.logout({ | ||
authority: this.getAuthority() | ||
}); | ||
// msalApplication.logoutRedirect(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this must be a stray comment :)
@@ -50,7 +50,10 @@ export class AuthenticationWrapper implements IAuthenticationWrapper { | |||
|
|||
public logOut() { | |||
this.deleteHomeAccountId(); | |||
msalApplication.logoutRedirect(); | |||
msalApplication.logout({ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The logout function is deprecated in msal. We can use the logoutRedirect function in place of this
Azure Static Web Apps: Your stage site is ready! Visit it here: https://jolly-sand-0ac78c710-955.centralus.azurestaticapps.net |
Azure Static Web Apps: Your stage site is ready! Visit it here: https://jolly-sand-0ac78c710-955.centralus.azurestaticapps.net |
} | ||
|
||
private canAccessChinaCloud() { | ||
return geLocale === 'en-US'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is this for?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was using this when sovereign clouds in different countries was something to support.
I would use the locale to match the clouds I had. So that if a cloud for the region exists I would suggest to the user that they can opt in to using another cloud
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This specific line was tied specifically to the China cloud.. I used en_Us for demos
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't believe we can use locale to determine anything reliable regarding what clouds a user wants to be able to use.
Azure Static Web Apps: Your stage site is ready! Visit it here: https://jolly-sand-0ac78c710-955.centralus.azurestaticapps.net |
SonarCloud Quality Gate failed. |
} | ||
|
||
const { emailAddress }: any = this.profile; | ||
return (emailAddress && emailAddress.includes('.onmicrosoft.com')); |
Check failure
Code scanning / CodeQL
Incomplete URL substring sanitization High
.onmicrosoft.com
Azure Static Web Apps: Your stage site is ready! Visit it here: https://jolly-sand-0ac78c710-955.centralus.azurestaticapps.net |
Quality Gate failedFailed conditions |
Azure Static Web Apps: Your stage site is ready! Visit it here: https://jolly-sand-0ac78c710-955.centralus.azurestaticapps.net |
Overview
Brings in the sovereign clouds feature (Closes #868)
Enables support for the canary environment (Closes #584)
Updates the Chinese version to the latest GE (Closes #614)
Demo
Notes
Testing Instructions
China cloud
Canary