├── User-Interface ├── .env ├── src │ ├── services │ │ ├── index.ts │ │ ├── deviceService.ts │ │ └── pawService.ts │ ├── components │ │ ├── PawActions │ │ │ ├── index.ts │ │ │ └── PawActions.tsx │ │ ├── Home │ │ │ ├── Home.css │ │ │ ├── index.ts │ │ │ └── Home.tsx │ │ ├── DeviceDetails │ │ │ ├── DeviceDetails.css │ │ │ ├── index.ts │ │ │ └── DeviceDetails.tsx │ │ ├── ComingSoon │ │ │ ├── index.ts │ │ │ └── ComingSoon.tsx │ │ ├── DeviceContainer │ │ │ ├── index.ts │ │ │ └── DeviceContainer.tsx │ │ ├── CommissionPawsPanel │ │ │ ├── index.ts │ │ │ ├── CommissionPawsPanel.tsx │ │ │ ├── CommissionPawsPanelFooter │ │ │ │ └── CommissionPawsPanelFooter.tsx │ │ │ └── CommissionPawsPanelContent │ │ │ │ ├── SelectedItems │ │ │ │ └── SelectedItems.tsx │ │ │ │ ├── CommissionPawsPanelContent.tsx │ │ │ │ └── FilteredItems │ │ │ │ └── FilteredItems.tsx │ │ ├── DeviceItemList │ │ │ ├── DeviceItemList.types.ts │ │ │ └── DeviceItemList.tsx │ │ ├── SearchBox │ │ │ └── AzureSearchBox.tsx │ │ ├── LeftNav │ │ │ ├── LeftNav.css │ │ │ └── LeftNav.tsx │ │ └── Header │ │ │ ├── Header.tsx │ │ │ └── Header.css │ ├── models │ │ ├── mocks │ │ │ ├── index.ts │ │ │ └── autopilotDeviceMock.ts │ │ ├── index.ts │ │ └── device.ts │ ├── Assets │ │ ├── Change.ico │ │ ├── Change.png │ │ ├── Info.ico │ │ ├── Info.png │ │ ├── Trash.ico │ │ ├── Trash.png │ │ ├── Wrench.ico │ │ ├── Wrench.png │ │ ├── Warning.ico │ │ ├── Warning.png │ │ ├── Cloud PAW Logo - Icon.ico │ │ ├── Cloud PAW Logo - 4k Raster.png │ │ └── groups.svg │ ├── features │ │ ├── ui │ │ │ ├── index.ts │ │ │ └── slicer.ts │ │ └── device │ │ │ ├── index.ts │ │ │ └── slicer.ts │ ├── store │ │ ├── selectors │ │ │ ├── index.ts │ │ │ └── deviceSelectors │ │ │ │ ├── index.ts │ │ │ │ └── filterById.ts │ │ ├── slice │ │ │ ├── index.ts │ │ │ └── pawAssignment.ts │ │ ├── actions │ │ │ ├── deviceActions │ │ │ │ ├── index.ts │ │ │ │ ├── types.ts │ │ │ │ └── gettingDeviceActions.ts │ │ │ └── pawActions │ │ │ │ ├── index.ts │ │ │ │ ├── gettingPawsActions.ts │ │ │ │ ├── types.ts │ │ │ │ ├── commissionPawActions.ts │ │ │ │ └── assignmentPawActions.ts │ │ ├── reducers │ │ │ ├── deviceReducers │ │ │ │ ├── index.ts │ │ │ │ └── gettingDevicesReducer.ts │ │ │ ├── appReducer.ts │ │ │ └── pawReducers │ │ │ │ ├── index.ts │ │ │ │ ├── gettingPawsReducer.ts │ │ │ │ ├── assignmentPawReducer.ts │ │ │ │ └── commissionPawReducer.ts │ │ ├── configureStore.ts │ │ └── store.ts │ ├── react-app-env.d.ts │ ├── setupTests.ts │ ├── index.css │ ├── reportWebVitals.ts │ ├── index.tsx │ ├── App.css │ ├── App.tsx │ └── themes.ts ├── public │ ├── robots.txt │ ├── favicon.ico │ ├── logo192.png │ ├── logo512.png │ ├── manifest.json │ └── index.html ├── .vscode │ ├── extensions.json │ ├── settings.json │ ├── express.code-snippets │ └── launch.json ├── .gitignore ├── tsconfig.json ├── package.json └── README.md ├── Server ├── .deployment ├── .gitignore ├── .mocharc.json ├── test │ ├── indexTest.ts │ └── UtilityTest.ts ├── src │ ├── Utility │ │ ├── i18n.ts │ │ ├── index.ts │ │ ├── Utility.ts │ │ ├── types.ts │ │ └── RequestGenerator.ts │ ├── Routes │ │ ├── OpenAPI.ts │ │ └── DeploymentEngine.ts │ ├── index.ts │ └── Startup │ │ └── Authentication.ts ├── .vscode │ ├── extensions.json │ ├── settings.json │ ├── launch.json │ └── server.code-snippets ├── package.json ├── disableeslintrc.json └── tsconfig.json ├── Privileged Security Management.code-workspace ├── .github ├── dependabot.yml ├── ISSUE_TEMPLATE │ ├── feature_request.md │ └── bug_report.md └── workflows │ ├── UnitTest-Server.js.yml │ ├── UnitTest-UI.js.yml │ ├── codeql-analysis.yml │ └── Build-Binaries.yml ├── azure-pipelines.yml ├── CODE_OF_CONDUCT.md ├── SUPPORT.md ├── PRIVACY ├── LICENSE ├── .gitignore ├── SECURITY.md └── README.md /User-Interface/.env: -------------------------------------------------------------------------------- 1 | BUILD_PATH='../Server/bin/src/UI' -------------------------------------------------------------------------------- /Server/.deployment: -------------------------------------------------------------------------------- 1 | [config] 2 | SCM_DO_BUILD_DURING_DEPLOYMENT=true -------------------------------------------------------------------------------- /User-Interface/src/services/index.ts: -------------------------------------------------------------------------------- 1 | export * from './pawService'; 2 | -------------------------------------------------------------------------------- /Server/.gitignore: -------------------------------------------------------------------------------- 1 | # dotenv environment variables file 2 | .env 3 | .env.test -------------------------------------------------------------------------------- /User-Interface/src/components/PawActions/index.ts: -------------------------------------------------------------------------------- 1 | export { PawActions } from './PawActions'; 2 | -------------------------------------------------------------------------------- /Server/.mocharc.json: -------------------------------------------------------------------------------- 1 | { 2 | "recursive": true, 3 | "spec": "bin/test/", 4 | "color": true 5 | } -------------------------------------------------------------------------------- /User-Interface/public/robots.txt: -------------------------------------------------------------------------------- 1 | # https://www.robotstxt.org/robotstxt.html 2 | User-agent: * 3 | Disallow: 4 | -------------------------------------------------------------------------------- /User-Interface/src/models/mocks/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./autopilotDeviceMock" 2 | export * from "./psmDeviceMock" -------------------------------------------------------------------------------- /Server/test/indexTest.ts: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. 2 | // Licensed under the MIT license. 3 | 4 | // Coming soon! -------------------------------------------------------------------------------- /User-Interface/src/components/Home/Home.css: -------------------------------------------------------------------------------- 1 | /* // Copyright (c) Microsoft Corporation. 2 | // Licensed under the MIT license. */ -------------------------------------------------------------------------------- /Server/src/Utility/i18n.ts: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. 2 | // Licensed under the MIT license. 3 | 4 | // Coming soon! -------------------------------------------------------------------------------- /User-Interface/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/Cloud-PAW-Management/HEAD/User-Interface/public/favicon.ico -------------------------------------------------------------------------------- /User-Interface/public/logo192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/Cloud-PAW-Management/HEAD/User-Interface/public/logo192.png -------------------------------------------------------------------------------- /User-Interface/public/logo512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/Cloud-PAW-Management/HEAD/User-Interface/public/logo512.png -------------------------------------------------------------------------------- /User-Interface/src/Assets/Change.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/Cloud-PAW-Management/HEAD/User-Interface/src/Assets/Change.ico -------------------------------------------------------------------------------- /User-Interface/src/Assets/Change.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/Cloud-PAW-Management/HEAD/User-Interface/src/Assets/Change.png -------------------------------------------------------------------------------- /User-Interface/src/Assets/Info.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/Cloud-PAW-Management/HEAD/User-Interface/src/Assets/Info.ico -------------------------------------------------------------------------------- /User-Interface/src/Assets/Info.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/Cloud-PAW-Management/HEAD/User-Interface/src/Assets/Info.png -------------------------------------------------------------------------------- /User-Interface/src/Assets/Trash.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/Cloud-PAW-Management/HEAD/User-Interface/src/Assets/Trash.ico -------------------------------------------------------------------------------- /User-Interface/src/Assets/Trash.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/Cloud-PAW-Management/HEAD/User-Interface/src/Assets/Trash.png -------------------------------------------------------------------------------- /User-Interface/src/Assets/Wrench.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/Cloud-PAW-Management/HEAD/User-Interface/src/Assets/Wrench.ico -------------------------------------------------------------------------------- /User-Interface/src/Assets/Wrench.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/Cloud-PAW-Management/HEAD/User-Interface/src/Assets/Wrench.png -------------------------------------------------------------------------------- /User-Interface/src/Assets/Warning.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/Cloud-PAW-Management/HEAD/User-Interface/src/Assets/Warning.ico -------------------------------------------------------------------------------- /User-Interface/src/Assets/Warning.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/Cloud-PAW-Management/HEAD/User-Interface/src/Assets/Warning.png -------------------------------------------------------------------------------- /User-Interface/src/components/DeviceDetails/DeviceDetails.css: -------------------------------------------------------------------------------- 1 | /* Copyright (c) Microsoft Corporation. */ 2 | /* Licensed under the MIT license. */ -------------------------------------------------------------------------------- /User-Interface/src/models/index.ts: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. 2 | // Licensed under the MIT license. 3 | 4 | export * from './device'; -------------------------------------------------------------------------------- /User-Interface/src/features/ui/index.ts: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. 2 | // Licensed under the MIT license. 3 | 4 | export * from "./slicer" -------------------------------------------------------------------------------- /User-Interface/src/components/Home/index.ts: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. 2 | // Licensed under the MIT license. 3 | 4 | export { Home } from "./Home" -------------------------------------------------------------------------------- /User-Interface/src/features/device/index.ts: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. 2 | // Licensed under the MIT license. 3 | 4 | export * from "./slicer" 5 | -------------------------------------------------------------------------------- /User-Interface/src/Assets/Cloud PAW Logo - Icon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/Cloud-PAW-Management/HEAD/User-Interface/src/Assets/Cloud PAW Logo - Icon.ico -------------------------------------------------------------------------------- /User-Interface/src/store/selectors/index.ts: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. 2 | // Licensed under the MIT license. 3 | 4 | export * from './deviceSelectors'; -------------------------------------------------------------------------------- /User-Interface/src/react-app-env.d.ts: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. 2 | // Licensed under the MIT license. 3 | 4 | /// 5 | -------------------------------------------------------------------------------- /User-Interface/src/Assets/Cloud PAW Logo - 4k Raster.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/Cloud-PAW-Management/HEAD/User-Interface/src/Assets/Cloud PAW Logo - 4k Raster.png -------------------------------------------------------------------------------- /User-Interface/src/components/ComingSoon/index.ts: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. 2 | // Licensed under the MIT license. 3 | 4 | export { ComingSoon } from "./ComingSoon"; -------------------------------------------------------------------------------- /User-Interface/src/store/slice/index.ts: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. 2 | // Licensed under the MIT license. 3 | 4 | export { pawAssignmentSlice } from "./pawAssignment" -------------------------------------------------------------------------------- /User-Interface/src/components/DeviceDetails/index.ts: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. 2 | // Licensed under the MIT license. 3 | 4 | export { DeviceDetails } from "./DeviceDetails"; -------------------------------------------------------------------------------- /User-Interface/src/store/selectors/deviceSelectors/index.ts: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. 2 | // Licensed under the MIT license. 3 | 4 | export { filterById } from './filterById'; -------------------------------------------------------------------------------- /User-Interface/src/components/DeviceContainer/index.ts: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. 2 | // Licensed under the MIT license. 3 | 4 | export { DeviceContainer } from './DeviceContainer'; -------------------------------------------------------------------------------- /User-Interface/src/components/CommissionPawsPanel/index.ts: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. 2 | // Licensed under the MIT license. 3 | 4 | export { CommissionPawsPanel } from './CommissionPawsPanel'; -------------------------------------------------------------------------------- /User-Interface/src/store/actions/deviceActions/index.ts: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. 2 | // Licensed under the MIT license. 3 | 4 | export * from './types'; 5 | export * from './gettingDeviceActions'; -------------------------------------------------------------------------------- /Privileged Security Management.code-workspace: -------------------------------------------------------------------------------- 1 | { 2 | "folders": [ 3 | { 4 | "name": "Server", 5 | "path": "Server" 6 | }, 7 | { 8 | "name": "User-Interface", 9 | "path": "User-Interface" 10 | } 11 | ], 12 | "settings": {} 13 | } -------------------------------------------------------------------------------- /User-Interface/src/components/DeviceItemList/DeviceItemList.types.ts: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. 2 | // Licensed under the MIT license. 3 | 4 | import { IPsmDevice } from '../../models'; 5 | 6 | export interface IPawItemListProps { 7 | items: IPsmDevice[]; 8 | }; -------------------------------------------------------------------------------- /User-Interface/.vscode/extensions.json: -------------------------------------------------------------------------------- 1 | { 2 | "recommendations": [ 3 | "streetsidesoftware.code-spell-checker", 4 | "dbaeumer.vscode-eslint", 5 | "ms-azuretools.vscode-azureappservice", 6 | "ms-vscode.azure-account", 7 | "eamodio.gitlens" 8 | ] 9 | } -------------------------------------------------------------------------------- /User-Interface/src/store/actions/pawActions/index.ts: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. 2 | // Licensed under the MIT license. 3 | 4 | export * from './types'; 5 | export * from './commissionPawActions'; 6 | export * from './gettingPawsActions'; 7 | export * from './assignmentPawActions'; -------------------------------------------------------------------------------- /Server/src/Utility/index.ts: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. 2 | // Licensed under the MIT license. 3 | 4 | export * from "./GraphClient" 5 | // export * from "./i18n" 6 | export * from "./RequestGenerator" 7 | export * from "./types" 8 | export * from "./Utility" 9 | export * from "./Validators" -------------------------------------------------------------------------------- /User-Interface/src/components/ComingSoon/ComingSoon.tsx: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. 2 | // Licensed under the MIT license. 3 | 4 | // Render a splash screen stating that the feature is coming soon! 5 | export function ComingSoon() { 6 | return ( 7 |

Coming Soon!

8 | ) 9 | } -------------------------------------------------------------------------------- /Server/.vscode/extensions.json: -------------------------------------------------------------------------------- 1 | { 2 | "recommendations": [ 3 | "streetsidesoftware.code-spell-checker", 4 | "dbaeumer.vscode-eslint", 5 | "ms-azuretools.vscode-azureappservice", 6 | "ms-vscode.azure-account", 7 | "eamodio.gitlens", 8 | "gruntfuggly.todo-tree" 9 | ] 10 | } -------------------------------------------------------------------------------- /User-Interface/src/store/reducers/deviceReducers/index.ts: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. 2 | // Licensed under the MIT license. 3 | 4 | import { combineReducers } from 'redux'; 5 | import { getDevices } from './gettingDevicesReducer'; 6 | 7 | export const devices = combineReducers({ 8 | getDevices, 9 | }); 10 | -------------------------------------------------------------------------------- /User-Interface/src/store/actions/deviceActions/types.ts: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. 2 | // Licensed under the MIT license. 3 | 4 | export const GETTING_DEVICE_REQUEST = 'GETTING_DEVICE_REQUEST'; 5 | export const GETTING_DEVICE_SUCCESS = 'GETTING_DEVICE_SUCCESS'; 6 | export const GETTING_DEVICE_FAILURE = 'GETTING_DEVICE_FAILURE' 7 | -------------------------------------------------------------------------------- /User-Interface/src/store/selectors/deviceSelectors/filterById.ts: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. 2 | // Licensed under the MIT license. 3 | 4 | export const filterById = (state, id) => { 5 | const filteredById = state.devices.getDevices.devices.filter(device => device.azureAdDeviceId.indexOf(id)>=0); 6 | return filteredById; 7 | }; -------------------------------------------------------------------------------- /.github/dependabot.yml: -------------------------------------------------------------------------------- 1 | version: 2 2 | updates: 3 | - package-ecosystem: npm 4 | directory: "/User-Interface" 5 | schedule: 6 | interval: daily 7 | time: "10:00" 8 | open-pull-requests-limit: 10 9 | - package-ecosystem: npm 10 | directory: "/Server" 11 | schedule: 12 | interval: daily 13 | time: "10:00" 14 | open-pull-requests-limit: 10 -------------------------------------------------------------------------------- /User-Interface/.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "cSpell.words": [ 3 | "Intune", 4 | "defaultuser", 5 | "keyvault" 6 | ], 7 | "appService.zipIgnorePattern": [ 8 | "node_modules{,/**}", 9 | ".vscode{,/**}" 10 | ], 11 | "appService.deploySubpath": ".", 12 | "appService.defaultWebAppToDeploy": "None" 13 | } -------------------------------------------------------------------------------- /User-Interface/src/store/reducers/appReducer.ts: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. 2 | // Licensed under the MIT license. 3 | 4 | import { combineReducers } from 'redux'; 5 | import { paw } from './pawReducers'; 6 | import { devices } from './deviceReducers'; 7 | 8 | export const appReducer = combineReducers({ 9 | paw, 10 | devices 11 | }); 12 | 13 | -------------------------------------------------------------------------------- /User-Interface/src/setupTests.ts: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. 2 | // Licensed under the MIT license. 3 | 4 | // jest-dom adds custom jest matchers for asserting on DOM nodes. 5 | // allows you to do things like: 6 | // expect(element).toHaveTextContent(/react/i) 7 | // learn more: https://github.com/testing-library/jest-dom 8 | import '@testing-library/jest-dom'; 9 | -------------------------------------------------------------------------------- /azure-pipelines.yml: -------------------------------------------------------------------------------- 1 | # Run the MS Internal component governance process and report the data internally. 2 | 3 | trigger: 4 | - main 5 | 6 | pool: 7 | vmImage: ubuntu-latest 8 | 9 | steps: 10 | - task: ComponentGovernanceComponentDetection@0 11 | inputs: 12 | scanType: 'Register' 13 | verbosity: 'Verbose' 14 | alertWarningLevel: 'High' 15 | displayName: 'Component Detection' -------------------------------------------------------------------------------- /User-Interface/src/store/configureStore.ts: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. 2 | // Licensed under the MIT license. 3 | 4 | import { createStore, applyMiddleware } from 'redux'; 5 | import thunk from 'redux-thunk'; 6 | import { appReducer } from './reducers/appReducer'; 7 | 8 | // TODO: Legacy implementation to be migrated to the toolkit 9 | export const store = createStore(appReducer, applyMiddleware(thunk)); -------------------------------------------------------------------------------- /Server/.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "cSpell.words": [ 3 | "defaultuser", 4 | "Intune", 5 | "keyvault", 6 | "odata" 7 | ], 8 | "appService.zipIgnorePattern": [ 9 | "node_modules{,/**}", 10 | ".vscode{,/**}" 11 | ], 12 | "appService.deploySubpath": ".", 13 | "appService.defaultWebAppToDeploy": "None", 14 | "editor.bracketPairColorization.enabled": true 15 | } -------------------------------------------------------------------------------- /User-Interface/.gitignore: -------------------------------------------------------------------------------- 1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files. 2 | 3 | # dependencies 4 | /node_modules 5 | /.pnp 6 | .pnp.js 7 | 8 | # testing 9 | /coverage 10 | 11 | # production 12 | /build 13 | 14 | # misc 15 | .DS_Store 16 | .env.local 17 | .env.development.local 18 | .env.test.local 19 | .env.production.local 20 | 21 | npm-debug.log* 22 | yarn-debug.log* 23 | yarn-error.log* 24 | -------------------------------------------------------------------------------- /User-Interface/src/features/ui/slicer.ts: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. 2 | // Licensed under the MIT license. 3 | 4 | import { createSlice } from "@reduxjs/toolkit"; 5 | 6 | export const uiSlice = createSlice({ 7 | // Domain of slicer 8 | name: 'ui', 9 | // Initially empty 10 | initialState: { commissionMode: false }, 11 | // Actions that can be performed on this data structure 12 | reducers: {} 13 | }); -------------------------------------------------------------------------------- /User-Interface/src/store/reducers/pawReducers/index.ts: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. 2 | // Licensed under the MIT license. 3 | 4 | import { combineReducers } from 'redux'; 5 | import { commissionPaws } from './commissionPawReducer'; 6 | import { getPaws } from './gettingPawsReducer'; 7 | import { assignPaw } from "./assignmentPawReducer"; 8 | 9 | export const paw = combineReducers({ 10 | assignPaw, 11 | commissionPaws, 12 | getPaws 13 | }); 14 | -------------------------------------------------------------------------------- /CODE_OF_CONDUCT.md: -------------------------------------------------------------------------------- 1 | # Microsoft Open Source Code of Conduct 2 | 3 | This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). 4 | 5 | Resources: 6 | 7 | - [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/) 8 | - [Microsoft Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) 9 | - Contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with questions or concerns 10 | -------------------------------------------------------------------------------- /User-Interface/src/index.css: -------------------------------------------------------------------------------- 1 | /* Copyright (c) Microsoft Corporation. */ 2 | /* Licensed under the MIT license. */ 3 | 4 | body { 5 | margin: 0; 6 | font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 7 | 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', 8 | sans-serif; 9 | -webkit-font-smoothing: antialiased; 10 | -moz-osx-font-smoothing: grayscale; 11 | } 12 | 13 | code { 14 | font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New', 15 | monospace; 16 | } 17 | -------------------------------------------------------------------------------- /User-Interface/src/reportWebVitals.ts: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. 2 | // Licensed under the MIT license. 3 | 4 | import { ReportHandler } from 'web-vitals'; 5 | 6 | const reportWebVitals = (onPerfEntry?: ReportHandler) => { 7 | if (onPerfEntry && onPerfEntry instanceof Function) { 8 | import('web-vitals').then(({ getCLS, getFID, getFCP, getLCP, getTTFB }) => { 9 | getCLS(onPerfEntry); 10 | getFID(onPerfEntry); 11 | getFCP(onPerfEntry); 12 | getLCP(onPerfEntry); 13 | getTTFB(onPerfEntry); 14 | }); 15 | } 16 | }; 17 | 18 | export default reportWebVitals; 19 | -------------------------------------------------------------------------------- /User-Interface/src/store/store.ts: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. 2 | // Licensed under the MIT license. 3 | 4 | import { configureStore } from "@reduxjs/toolkit" 5 | import { deviceSlice } from "../features/device" 6 | 7 | // Configure the default store for the app 8 | export const store = configureStore({ 9 | reducer: { 10 | device: deviceSlice.reducer 11 | } 12 | }); 13 | 14 | // Export the compiled RootState from the store 15 | export type RootState = ReturnType 16 | 17 | // Export the compiled dispatch data 18 | export type AppDispatch = typeof store.dispatch -------------------------------------------------------------------------------- /SUPPORT.md: -------------------------------------------------------------------------------- 1 | # Support 2 | 3 | ## How to file issues and get help 4 | 5 | This project uses GitHub Issues to track bugs and feature requests. Please search the existing 6 | issues before filing new issues to avoid duplicates. For new issues, file your bug or 7 | feature request as a new Issue. 8 | 9 | For help and questions about using this project, please contact your MCS or CSU/Premier/Unified Customer Success Account Manager (CSAM/TAM) and have them email "the-a-team@microsoft.com" (internal only email). 10 | 11 | ## Microsoft Support Policy 12 | 13 | Support for this **PROJECT or PRODUCT** is limited to the resources listed above. 14 | -------------------------------------------------------------------------------- /User-Interface/public/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "short_name": "Privileged Security Management", 3 | "name": "Automated Privileged Security Management", 4 | "icons": [ 5 | { 6 | "src": "favicon.ico", 7 | "sizes": "64x64 32x32 24x24 16x16", 8 | "type": "image/x-icon" 9 | }, 10 | { 11 | "src": "logo192.png", 12 | "type": "image/png", 13 | "sizes": "192x192" 14 | }, 15 | { 16 | "src": "logo512.png", 17 | "type": "image/png", 18 | "sizes": "512x512" 19 | } 20 | ], 21 | "start_url": ".", 22 | "display": "standalone", 23 | "theme_color": "#000000", 24 | "background_color": "#ffffff" 25 | } 26 | -------------------------------------------------------------------------------- /User-Interface/src/components/DeviceDetails/DeviceDetails.tsx: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. 2 | // Licensed under the MIT license. 3 | 4 | import React from "react"; 5 | import { useParams, useNavigate } from "react-router-dom" 6 | 7 | export function DeviceDetails() { 8 | const navigate = useNavigate(); 9 | const { id } = useParams(); 10 | 11 | // If no ID was specified, redirect the user to the device list 12 | if (id === undefined) { 13 | navigate("/"); 14 | }; 15 | 16 | return ( 17 | 18 |

Individual PAW device!

19 |

DeviceID: { id }

20 |
21 | ) 22 | } -------------------------------------------------------------------------------- /User-Interface/src/index.tsx: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. 2 | // Licensed under the MIT license. 3 | 4 | import React from 'react'; 5 | import ReactDOM from 'react-dom'; 6 | import { Provider } from 'react-redux'; 7 | import './index.css'; 8 | import App from './App'; 9 | import { store } from './store/configureStore'; 10 | 11 | // Start the react renderer with strict mode enabled for the whole app 12 | // Also adds a redux store to the root of the app so that a single global store is available 13 | ReactDOM.render( 14 | 15 | 16 | 17 | 18 | , 19 | document.getElementById('root') 20 | ); -------------------------------------------------------------------------------- /User-Interface/src/App.css: -------------------------------------------------------------------------------- 1 | /* Copyright (c) Microsoft Corporation. */ 2 | /* Licensed under the MIT license. */ 3 | 4 | .App { 5 | text-align: center; 6 | } 7 | 8 | .App-logo { 9 | height: 40vmin; 10 | pointer-events: none; 11 | } 12 | 13 | .App-header { 14 | background-color: #282c34; 15 | min-height: 100vh; 16 | display: flex; 17 | flex-direction: column; 18 | align-items: center; 19 | justify-content: center; 20 | font-size: calc(10px + 2vmin); 21 | color: white; 22 | } 23 | 24 | .App-link { 25 | color: #61dafb; 26 | } 27 | 28 | @keyframes App-logo-spin { 29 | from { 30 | transform: rotate(0deg); 31 | } 32 | to { 33 | transform: rotate(360deg); 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /User-Interface/src/models/device.ts: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. 2 | // Licensed under the MIT license. 3 | 4 | // Define the PSM processed autopilot device object structure 5 | export interface IPsmAutopilotDevice { 6 | displayName?: string, 7 | azureActiveDirectoryDeviceId: string, 8 | azureAdDeviceId: string, 9 | serialNumber: string 10 | } 11 | 12 | // Define the PSM's device object structure 13 | export interface IPsmDevice { 14 | Type: "Privileged" | "Developer" | "Tactical" 15 | ParentGroup: string 16 | ParentDevice?: string 17 | DisplayName: string 18 | id: string 19 | GroupAssignment: string 20 | UserAssignment: string 21 | CommissionedDate: string //UTC Time in ISO format 22 | } -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/feature_request.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Feature request 3 | about: Suggest an idea for this project 4 | title: 'Feature Request: ' 5 | labels: enhancement 6 | assignees: '' 7 | 8 | --- 9 | 10 | **Is your feature request related to a problem? Please describe.** 11 | A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] 12 | 13 | **Describe the solution you'd like** 14 | A clear and concise description of what you want to happen. 15 | 16 | **Describe alternatives you've considered** 17 | A clear and concise description of any alternative solutions or features you've considered. 18 | 19 | **Additional context** 20 | Add any other context or screenshots about the feature request here. 21 | -------------------------------------------------------------------------------- /User-Interface/src/App.tsx: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. 2 | // Licensed under the MIT license. 3 | 4 | import { Home } from "./components/Home"; 5 | import { DeviceContainer } from "./components/DeviceContainer"; 6 | import { DeviceDetails } from "./components/DeviceDetails"; 7 | import { BrowserRouter, Routes, Route } from "react-router-dom"; 8 | 9 | function App() { 10 | return ( 11 | 12 |
13 | 14 | } /> 15 | } /> 16 | } /> 17 | 18 |
19 |
20 | ); 21 | } 22 | 23 | export default App; -------------------------------------------------------------------------------- /User-Interface/src/components/SearchBox/AzureSearchBox.tsx: -------------------------------------------------------------------------------- 1 | import * as React from 'react'; 2 | import { SearchBox, ISearchBoxStyles } from '@fluentui/react/lib/SearchBox'; 3 | 4 | const searchBoxStyles: Partial = { root: { width: 500, 5 | margin: 8 } }; 6 | 7 | /* eslint-disable react/jsx-no-bind */ 8 | export const AzureSearchBox = () => ( 9 | { 13 | console.log('Custom onEscape Called'); 14 | }} 15 | onClear={ev => { 16 | console.log('Custom onClear Called'); 17 | }} 18 | onChange={(_, newValue) => console.log('SearchBox onChange fired: ' + newValue)} 19 | onSearch={newValue => console.log('SearchBox onSearch fired: ' + newValue)} 20 | /> 21 | ); -------------------------------------------------------------------------------- /PRIVACY: -------------------------------------------------------------------------------- 1 | The software may collect information about you and your use of the software and send it to Microsoft. 2 | Microsoft may use this information to provide services and improve our products and services. 3 | You may turn off the telemetry as described in the repository. 4 | There are also some features in the software that may enable you and Microsoft to collect data from users of your applications. 5 | If you use these features, you must comply with applicable law, including providing appropriate notices to users of your applications together with a copy of Microsoft's privacy statement. 6 | Our privacy statement is located at https://go.microsoft.com/fwlink/?LinkID=824704. 7 | You can learn more about data collection and use in the help documentation and our privacy statement. 8 | Your use of the software operates as your consent to these practices. 9 | -------------------------------------------------------------------------------- /User-Interface/src/store/actions/pawActions/gettingPawsActions.ts: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. 2 | // Licensed under the MIT license. 3 | 4 | import { IPsmDevice } from '../../../models'; 5 | import { PawService } from '../../../services'; 6 | import { 7 | GETTING_PAWS_REQUEST, 8 | GETTING_PAWS_SUCCESS, 9 | GETTING_PAWS_FAILURE 10 | } from './types'; 11 | 12 | const gettingPawsRequest = () => ({ 13 | type: GETTING_PAWS_REQUEST, 14 | }); 15 | const gettingPawsSuccess = (paws: IPsmDevice[]) => ({ 16 | type: GETTING_PAWS_SUCCESS, 17 | payload: paws 18 | }); 19 | const gettingPawsFailure = (error: Error) => ({ 20 | type: GETTING_PAWS_FAILURE, 21 | payload: error 22 | }); 23 | 24 | export const getPaws = () => { 25 | return async (dispatch) => { 26 | dispatch(gettingPawsRequest()); 27 | PawService.getPaws() 28 | .then(paws => dispatch(gettingPawsSuccess(paws))) 29 | .catch(error => dispatch(gettingPawsFailure(error))) 30 | }; 31 | } -------------------------------------------------------------------------------- /User-Interface/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "include": [ 3 | "src" 4 | ], 5 | "compilerOptions": { 6 | "target": "ES2019", 7 | "lib": [ 8 | "dom", 9 | "dom.iterable", 10 | "esnext" 11 | ], 12 | "jsx": "react-jsx", 13 | "module": "esnext", 14 | "moduleResolution": "node", 15 | "resolveJsonModule": true, 16 | "sourceMap": true, 17 | "outDir": "./bin", 18 | "removeComments": true, 19 | "noEmit": true, 20 | "isolatedModules": true, 21 | "esModuleInterop": true, 22 | "forceConsistentCasingInFileNames": true, 23 | "strict": true, 24 | "noImplicitAny": false, 25 | "strictNullChecks": true, 26 | "strictFunctionTypes": true, 27 | "strictBindCallApply": true, 28 | "strictPropertyInitialization": true, 29 | "noImplicitThis": true, 30 | "alwaysStrict": true, 31 | "noFallthroughCasesInSwitch": true, 32 | "skipLibCheck": true, 33 | "allowJs": true, 34 | "allowSyntheticDefaultImports": true 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/bug_report.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Bug report 3 | about: Create a report to help us improve 4 | title: 'Bug Report: ' 5 | labels: bug 6 | assignees: '' 7 | 8 | --- 9 | 10 | **Describe the bug** 11 | A clear and concise description of what the bug is. 12 | 13 | **To Reproduce** 14 | Steps to reproduce the behavior: 15 | 1. Go to '...' 16 | 2. Click on '....' 17 | 3. Scroll down to '....' 18 | 4. See error 19 | 20 | **Expected behavior** 21 | A clear and concise description of what you expected to happen. 22 | 23 | **Screenshots** 24 | If applicable, add screenshots to help explain your problem. 25 | 26 | **Desktop (please complete the following information):** 27 | - OS: [e.g. iOS] 28 | - Browser [e.g. chrome, safari] 29 | - Version [e.g. 22] 30 | 31 | **Smartphone (please complete the following information):** 32 | - Device: [e.g. iPhone6] 33 | - OS: [e.g. iOS8.1] 34 | - Browser [e.g. stock browser, safari] 35 | - Version [e.g. 22] 36 | 37 | **Additional context** 38 | Add any other context about the problem here. 39 | -------------------------------------------------------------------------------- /User-Interface/src/store/actions/deviceActions/gettingDeviceActions.ts: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. 2 | // Licensed under the MIT license. 3 | 4 | import { IPsmAutopilotDevice } from '../../../models'; 5 | import { DeviceService } from '../../../services/deviceService'; 6 | import { 7 | GETTING_DEVICE_REQUEST, 8 | GETTING_DEVICE_SUCCESS, 9 | GETTING_DEVICE_FAILURE 10 | } from './types'; 11 | 12 | const gettingDeviceRequest = () => ({ 13 | type: GETTING_DEVICE_REQUEST, 14 | }); 15 | const gettingDevicesSuccess = (devices: IPsmAutopilotDevice[]) => ({ 16 | type: GETTING_DEVICE_SUCCESS, 17 | payload: devices 18 | }); 19 | const gettingDevicesFailure = (error: Error) => ({ 20 | type: GETTING_DEVICE_FAILURE, 21 | payload: error 22 | }); 23 | 24 | export const getDevices = () => { 25 | return async (dispatch) => { 26 | dispatch(gettingDeviceRequest()); 27 | DeviceService.getDevices() 28 | .then(devices => dispatch(gettingDevicesSuccess(devices))) 29 | .catch(error => dispatch(gettingDevicesFailure(error))) 30 | }; 31 | } -------------------------------------------------------------------------------- /.github/workflows/UnitTest-Server.js.yml: -------------------------------------------------------------------------------- 1 | # This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node 2 | # For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions 3 | 4 | name: Unit Test - Server 5 | 6 | on: 7 | push: 8 | branches: [ main ] 9 | paths: 10 | - Server/** 11 | pull_request: 12 | branches: [ main ] 13 | paths: 14 | - Server/** 15 | workflow_dispatch: 16 | 17 | jobs: 18 | build: 19 | 20 | runs-on: ubuntu-latest 21 | 22 | strategy: 23 | matrix: 24 | node-version: [16.x, 17.x] 25 | 26 | steps: 27 | - uses: actions/checkout@v2 28 | - name: Use Node.js ${{ matrix.node-version }} 29 | uses: actions/setup-node@v2 30 | with: 31 | node-version: ${{ matrix.node-version }} 32 | cache: 'npm' 33 | cache-dependency-path: Server/package-lock.json 34 | - run: npm ci 35 | working-directory: Server 36 | - run: npm run-script build --if-present 37 | working-directory: Server 38 | - run: npm run-script test 39 | working-directory: Server 40 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) Microsoft Corporation. 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE 22 | -------------------------------------------------------------------------------- /User-Interface/src/store/reducers/pawReducers/gettingPawsReducer.ts: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. 2 | // Licensed under the MIT license. 3 | 4 | import { 5 | GETTING_PAWS_REQUEST, 6 | GETTING_PAWS_SUCCESS, 7 | GETTING_PAWS_FAILURE, 8 | } from '../../actions/pawActions'; 9 | 10 | const initialState = { 11 | paws: [], 12 | isGettingPaws: false, 13 | error: undefined, 14 | }; 15 | export const getPaws = (state = initialState, action: any) => { 16 | switch(action.type) { 17 | case GETTING_PAWS_REQUEST: 18 | return { 19 | ...state, 20 | isGettingPaws: true 21 | }; 22 | case GETTING_PAWS_SUCCESS: 23 | return { 24 | ...state, 25 | isGettingPaws: false, 26 | paws: action.payload, 27 | error: undefined, 28 | }; 29 | case GETTING_PAWS_FAILURE: 30 | return { 31 | ...state, 32 | isGettingPaws: false, 33 | error: action.payload 34 | }; 35 | default: 36 | return state; 37 | } 38 | }; 39 | -------------------------------------------------------------------------------- /User-Interface/src/components/LeftNav/LeftNav.css: -------------------------------------------------------------------------------- 1 | * { 2 | box-sizing: border-box; 3 | } 4 | 5 | html, body { 6 | margin: 0; 7 | padding: 0; 8 | width: 100%; 9 | width: 100%; 10 | } 11 | 12 | #wrapper { 13 | display: block; 14 | position: fixed; 15 | width: 100%; 16 | height: 100%; 17 | } 18 | 19 | #leftWrapper { 20 | display: inline-block; 21 | position: absolute; 22 | left: 0; 23 | margin: 0; 24 | padding: 0; 25 | width: 15em; 26 | height: 100%; 27 | 28 | background-color: #1e1e1e; 29 | } 30 | 31 | #listView { 32 | display: block; 33 | position: relative; 34 | } 35 | 36 | #listView li { 37 | display: block; 38 | list-style: none; 39 | } 40 | 41 | #listView li a { 42 | display: block; 43 | padding: 20px; 44 | 45 | color: #fff; 46 | font-family: sans-serif; 47 | font-size: 1.1em; 48 | text-decoration: none; 49 | 50 | border-top: 1px solid rgba(0,0,0,0.5); 51 | border-bottom:1px solid rgba(255,255,255,0.04); 52 | 53 | -webkit-transition: all .20s ease; 54 | -moz-transition: all .20s ease; 55 | -o-transition: all .20s ease; 56 | transition: all .20s ease; 57 | } 58 | -------------------------------------------------------------------------------- /User-Interface/src/store/reducers/deviceReducers/gettingDevicesReducer.ts: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. 2 | // Licensed under the MIT license. 3 | 4 | import { 5 | GETTING_DEVICE_REQUEST, 6 | GETTING_DEVICE_SUCCESS, 7 | GETTING_DEVICE_FAILURE 8 | } from '../../actions/deviceActions'; 9 | 10 | const initialState = { 11 | devices: [], 12 | isGettingDevices: false, 13 | error: undefined, 14 | }; 15 | export const getDevices = (state = initialState, action: any) => { 16 | switch(action.type) { 17 | case GETTING_DEVICE_REQUEST: 18 | return { 19 | ...state, 20 | isGettingDevices: true 21 | }; 22 | case GETTING_DEVICE_SUCCESS: 23 | return { 24 | ...state, 25 | isGettingDevices: false, 26 | devices: action.payload, 27 | error: undefined, 28 | }; 29 | case GETTING_DEVICE_FAILURE: 30 | return { 31 | ...state, 32 | isGettingDevices: false, 33 | error: action.payload 34 | }; 35 | default: 36 | return state; 37 | } 38 | }; 39 | -------------------------------------------------------------------------------- /.github/workflows/UnitTest-UI.js.yml: -------------------------------------------------------------------------------- 1 | # This workflow will do a clean install of node dependencies, cache/restore them, build the source code and run tests across different versions of node 2 | # For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions 3 | 4 | name: Unit Test - User Interface 5 | 6 | on: 7 | # push: 8 | # branches: [ main ] 9 | # paths: 10 | # - User-Interface/** 11 | # pull_request: 12 | # branches: [ main ] 13 | # paths: 14 | # - User-Interface/** 15 | workflow_dispatch: 16 | 17 | jobs: 18 | build: 19 | 20 | runs-on: ubuntu-latest 21 | 22 | strategy: 23 | matrix: 24 | node-version: [16.x, 17.x] 25 | # See supported Node.js release schedule at https://nodejs.org/en/about/releases/ 26 | 27 | steps: 28 | - uses: actions/checkout@v2 29 | - name: Use Node.js ${{ matrix.node-version }} 30 | uses: actions/setup-node@v2 31 | with: 32 | node-version: ${{ matrix.node-version }} 33 | cache: 'npm' 34 | cache-dependency-path: User-Interface/package-lock.json 35 | - run: npm ci 36 | working-directory: User-Interface 37 | - run: npm run-script build --if-present 38 | working-directory: User-Interface 39 | - run: npm run-script test 40 | working-directory: User-Interface 41 | -------------------------------------------------------------------------------- /User-Interface/src/components/Home/Home.tsx: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. 2 | // Licensed under the MIT license. 3 | 4 | import { PrimaryButton } from "@fluentui/react"; 5 | import React from "react"; 6 | import { useNavigate } from "react-router-dom"; 7 | 8 | // Initial landing page 9 | export function Home() { 10 | 11 | // Instantiate the Page Navigator 12 | const navigator = useNavigate(); 13 | 14 | // Define the on-click event function 15 | function onClickPageNavDevice(): void { 16 | // Navigate to the devices page 17 | navigator("/devices"); 18 | }; 19 | 20 | return ( 21 | 22 |

Welcome to Privileged Security Management

23 |

Please select a module to administer

24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 |
32 | ) 33 | } -------------------------------------------------------------------------------- /User-Interface/.vscode/express.code-snippets: -------------------------------------------------------------------------------- 1 | { 2 | // Place your Cloud-PAW-Management workspace snippets here. Each snippet is defined under a snippet name and has a scope, prefix, body and 3 | // description. Add comma separated ids of the languages where the snippet is applicable in the scope field. If scope 4 | // is left empty or omitted, the snippet gets applied to all languages. The prefix is what is 5 | // used to trigger the snippet and the body will be expanded and inserted. Possible variables are: 6 | // $1, $2 for tab stops, $0 for the final cursor position, and ${1:label}, ${2:another} for placeholders. 7 | // Placeholders with the same ids are connected. 8 | // Example: 9 | // "Print to console": { 10 | // "scope": "javascript,typescript", 11 | // "prefix": "log", 12 | // "body": [ 13 | // "console.log('$1');", 14 | // "$2" 15 | // ], 16 | // "description": "Log output to console" 17 | // } 18 | "Route Callback": { 19 | "prefix": "route-callback", 20 | "description": "Pre-built callback with error handling", 21 | "scope": "javascript,typescript", 22 | "body": [ 23 | "async (request, response, next) => {", 24 | " \/\/ Catch execution errors", 25 | " try {", 26 | " \/\/ ${2:Describe the action}", 27 | " ${1:\/\/Action to execute};", 28 | " } catch (error) {", 29 | " \/\/ Send the error details if something goes wrong", 30 | " next(error);", 31 | " };", 32 | "}" 33 | ] 34 | } 35 | } -------------------------------------------------------------------------------- /User-Interface/src/Assets/groups.svg: -------------------------------------------------------------------------------- 1 | Icon-identity-223 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /User-Interface/src/components/CommissionPawsPanel/CommissionPawsPanel.tsx: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. 2 | // Licensed under the MIT license. 3 | 4 | import { Panel, PanelType } from "@fluentui/react"; 5 | import React, { useEffect } from "react"; 6 | import { useDispatch } from "react-redux"; 7 | import { getDevices } from "../../store/actions/deviceActions"; 8 | import { CommissionPawsPanelContent } from "./CommissionPawsPanelContent/CommissionPawsPanelContent"; 9 | import { CommissionPawsPanelFooter } from "./CommissionPawsPanelFooter/CommissionPawsPanelFooter"; 10 | 11 | interface ICommissionPawsPanelProps { 12 | isOpen: boolean; 13 | onDismissPanel?: () => void; 14 | } 15 | export const CommissionPawsPanel = ({ isOpen, onDismissPanel}: ICommissionPawsPanelProps) => { 16 | const dispatch = useDispatch(); 17 | 18 | useEffect(() => { 19 | dispatch(getDevices()); 20 | }, [dispatch]); 21 | 22 | const onRenderFooterContent = React.useCallback( 23 | () => , 24 | [onDismissPanel], 25 | ); 26 | return ( 27 | 37 | 38 | 39 | ); 40 | }; 41 | -------------------------------------------------------------------------------- /User-Interface/src/components/CommissionPawsPanel/CommissionPawsPanelFooter/CommissionPawsPanelFooter.tsx: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. 2 | // Licensed under the MIT license. 3 | 4 | import { DefaultButton, IStackTokens, PrimaryButton, Stack } from '@fluentui/react'; 5 | import React, { useCallback } from 'react'; 6 | import { RootStateOrAny, useDispatch, useSelector } from 'react-redux'; 7 | import { commissionPaws } from '../../../store/actions/pawActions'; 8 | 9 | export const CommissionPawsPanelFooter = (props) => { 10 | const stackTokens: Partial = { childrenGap: 20 }; 11 | const selectedItems = useSelector((state: RootStateOrAny) => state.paw.commissionPaws.devicesToCommission); 12 | const pawTypeToCommission = useSelector((state: RootStateOrAny) => state.paw.commissionPaws.pawTypeToCommission); 13 | 14 | const dispatch = useDispatch(); 15 | 16 | const dismissPanel = () => { 17 | props.onDismissPanel(); 18 | }; 19 | const onCommissionPaws = useCallback(() => { 20 | dispatch(commissionPaws(selectedItems, pawTypeToCommission)); 21 | props.onDismissPanel(); 22 | }, [dispatch, selectedItems, pawTypeToCommission, props]); 23 | 24 | return ( 25 | 26 | 30 | Commission PAW 31 | 32 | Cancel 33 | 34 | ); 35 | }; -------------------------------------------------------------------------------- /User-Interface/src/components/Header/Header.tsx: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. 2 | // Licensed under the MIT license. 3 | 4 | /* eslint-disable jsx-a11y/anchor-is-valid */ 5 | import './Header.css'; 6 | // import groups from '../../Assets/groups.svg'; 7 | // import {AzureSearchBox} from '../SearchBox/AzureSearchBox'; 8 | import * as React from 'react'; 9 | // import { FontIcon } from '@fluentui/react/lib/Icon'; 10 | // import { mergeStyles } from '@fluentui/react/lib/Styling'; 11 | 12 | // const iconClass = mergeStyles({ 13 | // fontSize: 50, 14 | // height: 50, 15 | // width: 50, 16 | // margin: '0 25px', 17 | // }); 18 | 19 | export const Header = () => { 20 | return ( 21 |
22 | 26 | {/*
27 | 30 |
*/} 31 |
32 | 33 | 39 | {/* */} 40 |
34 | 37 | 38 | Lifecycle Management | All PAWs
Microsoft - Azure Active Directory
41 |
42 |
43 | ) 44 | } 45 | -------------------------------------------------------------------------------- /Server/.vscode/launch.json: -------------------------------------------------------------------------------- 1 | { 2 | // Use IntelliSense to learn about possible attributes. 3 | // Hover to view descriptions of existing attributes. 4 | // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 5 | "version": "0.2.0", 6 | "configurations": [ 7 | { 8 | "name": "Build and Run", 9 | "request": "launch", 10 | "runtimeArgs": [ 11 | "run-script", 12 | "build_run" 13 | ], 14 | "runtimeExecutable": "npm", 15 | "skipFiles": [ 16 | "/**" 17 | ], 18 | "type": "pwa-node" 19 | }, 20 | { 21 | "name": "Build and Test", 22 | "request": "launch", 23 | "runtimeArgs": [ 24 | "run-script", 25 | "build_test" 26 | ], 27 | "runtimeExecutable": "npm", 28 | "skipFiles": [ 29 | "/**" 30 | ], 31 | "type": "pwa-node" 32 | }, 33 | { 34 | "name": "Build", 35 | "request": "launch", 36 | "runtimeArgs": [ 37 | "run-script", 38 | "build" 39 | ], 40 | "runtimeExecutable": "npm", 41 | "skipFiles": [ 42 | "/**" 43 | ], 44 | "type": "pwa-node" 45 | }, 46 | { 47 | "name": "Run Tests", 48 | "request": "launch", 49 | "runtimeArgs": [ 50 | "run-script", 51 | "test" 52 | ], 53 | "runtimeExecutable": "npm", 54 | "skipFiles": [ 55 | "/**" 56 | ], 57 | "type": "pwa-node" 58 | } 59 | ] 60 | } -------------------------------------------------------------------------------- /User-Interface/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "privileged-security-management-ui", 3 | "version": "0.0.1", 4 | "private": "true", 5 | "keywords": [ 6 | "Intune", 7 | "Endpoint Manager", 8 | "Microsoft", 9 | "PAW", 10 | "Web app", 11 | "interactive login" 12 | ], 13 | "author": "Elliot Huffman", 14 | "license": "MIT", 15 | "repository": { 16 | "type": "git", 17 | "url": "https://github.com/microsoft/Privileged-Security-Management" 18 | }, 19 | "dependencies": { 20 | "@fluentui/react": "^8.86.4", 21 | "@reduxjs/toolkit": "^1.8.3", 22 | "react": "^17.0.2", 23 | "react-dom": "^17.0.2", 24 | "react-redux": "^7.2.8", 25 | "react-router-dom": "^6.3.0" 26 | }, 27 | "devDependencies": { 28 | "@microsoft/microsoft-graph-types-beta": "^0.29.0-preview", 29 | "@testing-library/jest-dom": "^5.16.4", 30 | "@testing-library/react": "^12.1.4", 31 | "@testing-library/user-event": "^13.5.0", 32 | "@types/jest": "^28.1.1", 33 | "@types/node": "^18.6.4", 34 | "@types/react": "^17.0.43", 35 | "@types/react-dom": "^17.0.14", 36 | "@types/react-redux": "^7.1.23", 37 | "@types/redux": "^3.6.31", 38 | "react-scripts": "^5.0.1", 39 | "typescript": "^4.7.4", 40 | "web-vitals": "^2.1.4" 41 | }, 42 | "scripts": { 43 | "start": "react-scripts start", 44 | "build": "react-scripts build", 45 | "test": "react-scripts test", 46 | "eject": "react-scripts eject" 47 | }, 48 | "eslintConfig": { 49 | "extends": [ 50 | "react-app", 51 | "react-app/jest" 52 | ] 53 | }, 54 | "browserslist": { 55 | "production": [ 56 | ">0.2%", 57 | "not dead", 58 | "not op_mini all" 59 | ], 60 | "development": [ 61 | "last 1 chrome version", 62 | "last 1 firefox version", 63 | "last 1 safari version" 64 | ] 65 | } 66 | } 67 | -------------------------------------------------------------------------------- /User-Interface/.vscode/launch.json: -------------------------------------------------------------------------------- 1 | { 2 | // Use IntelliSense to learn about possible attributes. 3 | // Hover to view descriptions of existing attributes. 4 | // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 5 | "version": "0.2.0", 6 | "configurations": [ 7 | { 8 | "name": "Build and Run", 9 | "request": "launch", 10 | "runtimeArgs": [ 11 | "run-script", 12 | "build_run" 13 | ], 14 | "runtimeExecutable": "npm", 15 | "skipFiles": [ 16 | "/**" 17 | ], 18 | "type": "pwa-node" 19 | }, 20 | { 21 | "name": "Build and Test", 22 | "request": "launch", 23 | "runtimeArgs": [ 24 | "run-script", 25 | "build_test" 26 | ], 27 | "runtimeExecutable": "npm", 28 | "skipFiles": [ 29 | "/**" 30 | ], 31 | "type": "pwa-node" 32 | }, 33 | { 34 | "name": "Build", 35 | "request": "launch", 36 | "runtimeArgs": [ 37 | "run-script", 38 | "build" 39 | ], 40 | "runtimeExecutable": "npm", 41 | "skipFiles": [ 42 | "/**" 43 | ], 44 | "type": "pwa-node" 45 | }, 46 | { 47 | "name": "Run Tests", 48 | "request": "launch", 49 | "runtimeArgs": [ 50 | "run-script", 51 | "test" 52 | ], 53 | "runtimeExecutable": "npm", 54 | "skipFiles": [ 55 | "/**" 56 | ], 57 | "type": "pwa-node" 58 | } 59 | ] 60 | } -------------------------------------------------------------------------------- /Server/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "privileged-security-management-server", 3 | "version": "1.1.0", 4 | "description": "A utility to easily manage privileged security via a web app.", 5 | "main": "bin/src/index.js", 6 | "bin": "bin/src/index.js", 7 | "private": "true", 8 | "scripts": { 9 | "start": "node ./bin/src/index.js", 10 | "test": "mocha", 11 | "build": "tsc", 12 | "build_run": "tsc && node ./bin/src/index.js", 13 | "build_test": "tsc && mocha" 14 | }, 15 | "repository": { 16 | "type": "git", 17 | "url": "https://github.com/microsoft/Privileged-Security-Management" 18 | }, 19 | "keywords": [ 20 | "Intune", 21 | "Endpoint Manager", 22 | "Microsoft", 23 | "PAW", 24 | "Web app", 25 | "interactive login" 26 | ], 27 | "author": "Elliot Huffman", 28 | "license": "MIT", 29 | "devDependencies": { 30 | "@microsoft/microsoft-graph-types-beta": "^0.29.0-preview", 31 | "@types/chai": "^4.3.1", 32 | "@types/express": "^4.17.13", 33 | "@types/mocha": "^9.1.1", 34 | "@types/swagger-ui-express": "^4.1.3", 35 | "@typescript-eslint/eslint-plugin": "^5.32.0", 36 | "@typescript-eslint/parser": "^5.32.0", 37 | "chai": "^4.3.6", 38 | "eslint": "^8.21.0", 39 | "mocha": "^10.0.0", 40 | "typescript": "^4.7.4" 41 | }, 42 | "dependencies": { 43 | "@azure/identity": "^2.1.0", 44 | "@azure/keyvault-secrets": "^4.4.0", 45 | "@microsoft/microsoft-graph-client": "^3.0.2", 46 | "express": "^4.18.1", 47 | "helmet": "^5.1.1", 48 | "isomorphic-fetch": "^3.0.0", 49 | "swagger-ui-express": "^4.5.0" 50 | }, 51 | "pkg": { 52 | "scripts": "bin/src/**/*.js", 53 | "assets": [ 54 | "node_modules/**/*", 55 | "bin/src/UI/**/*" 56 | ], 57 | "targets": [ 58 | "node16-win-x64", 59 | "node16-linux-x64" 60 | ], 61 | "outputPath": "dist" 62 | } 63 | } -------------------------------------------------------------------------------- /User-Interface/src/themes.ts: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. 2 | // Licensed under the MIT license. 3 | 4 | export const lightTheme = { 5 | palette: { 6 | themePrimary: '#058ef7', 7 | themeLighterAlt: '#00060a', 8 | themeLighter: '#011728', 9 | themeLight: '#012b4a', 10 | themeTertiary: '#035594', 11 | themeSecondary: '#047dda', 12 | themeDarkAlt: '#1d99f8', 13 | themeDark: '#40a9f9', 14 | themeDarker: '#71bffb', 15 | neutralLighterAlt: '#302f2f', 16 | neutralLighter: '#383737', 17 | neutralLight: '#464444', 18 | neutralQuaternaryAlt: '#4e4d4d', 19 | neutralQuaternary: '#555454', 20 | neutralTertiaryAlt: '#727070', 21 | neutralTertiary: '#fffefd', 22 | neutralSecondary: '#fffefe', 23 | neutralPrimaryAlt: '#fffefe', 24 | neutralPrimary: '#fffefc', 25 | neutralDark: '#fffffe', 26 | black: '#ffffff', 27 | white: '#262525', 28 | } 29 | }; 30 | export const darkTheme = { 31 | palette: { 32 | themePrimary: '#058ef7', 33 | themeLighterAlt: '#00060a', 34 | themeLighter: '#011728', 35 | themeLight: '#012b4a', 36 | themeTertiary: '#035594', 37 | themeSecondary: '#047dda', 38 | themeDarkAlt: '#1d99f8', 39 | themeDark: '#40a9f9', 40 | themeDarker: '#71bffb', 41 | neutralLighterAlt: '#302f2f', 42 | neutralLighter: '#383737', 43 | neutralLight: '#464444', 44 | neutralQuaternaryAlt: '#4e4d4d', 45 | neutralQuaternary: '#555454', 46 | neutralTertiaryAlt: '#727070', 47 | neutralTertiary: '#fffefd', 48 | neutralSecondary: '#fffefe', 49 | neutralPrimaryAlt: '#fffefe', 50 | neutralPrimary: '#fffefc', 51 | neutralDark: '#fffffe', 52 | black: '#ffffff', 53 | white: '#262525', 54 | } 55 | }; -------------------------------------------------------------------------------- /User-Interface/src/store/actions/pawActions/types.ts: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. 2 | // Licensed under the MIT license. 3 | 4 | export const GETTING_PAWS_REQUEST = 'GETTING_PAWS_REQUEST'; 5 | export const GETTING_PAWS_SUCCESS = 'GETTING_PAWS_SUCCESS'; 6 | export const GETTING_PAWS_FAILURE = 'GETTING_PAWS_FAILURE'; 7 | 8 | export const COMMISSIONING_PAWS_REQUEST = 'COMMISSIONING_PAWS_REQUEST'; 9 | export const COMMISSIONING_PAWS_SUCCESS = 'COMMISSIONING_PAWS_SUCCESS'; 10 | export const COMMISSIONING_PAWS_FAILURE = 'COMMISSIONING_PAWS_FAILURE'; 11 | 12 | export const DECOMMISSIONING_PAW_SELECTED = 'DECOMMISSIONING_PAW_SELECTED'; 13 | export const DECOMMISSIONING_PAWS_REQUEST = 'DECOMMISSIONING_PAWS_REQUEST'; 14 | export const DECOMMISSIONING_PAWS_SUCCESS = 'DECOMMISSIONING_PAWS_SUCCESS'; 15 | export const DECOMMISSIONING_PAWS_FAILURE = 'DECOMMISSIONING_PAWS_FAILURE'; 16 | 17 | export const SELECT_DEVICES_TO_COMMISSION_PAW = 'SELECTED_DEVICES_TO_COMMISSION_PAW'; 18 | export const SELECT_PAW_TYPE_TO_COMMISSION = 'SELECT_PAW_TYPE_TO_COMMISSION'; 19 | export const REMOVE_DEVICE_FROM_COMMISSION_PAW_LIST = 'REMOVE_DEVICE_FROM_COMMISSION_PAW_LIST'; 20 | 21 | export const PAW_LIST_REFRESH_SUCCESS = 'PAW_LIST_REFRESH_SUCCESS'; 22 | 23 | export const GETTING_PAW_ASSIGNMENT_REQUEST = 'GETTING_PAW_ASSIGNMENT_REQUEST'; 24 | export const GETTING_PAW_ASSIGNMENT_SUCCESS = 'GETTING_PAW_ASSIGNMENT_SUCCESS'; 25 | export const GETTING_PAW_ASSIGNMENT_FAILURE = 'GETTING_PAW_ASSIGNMENT_FAILURE'; 26 | 27 | export const ASSIGN_PAW_REQUEST = 'ASSIGN_PAW_REQUEST'; 28 | export const ASSIGN_PAW_SUCCESS = 'ASSIGN_PAW_SUCCESS'; 29 | export const ASSIGN_PAW_FAILURE = 'ASSIGN_PAW_FAILURE'; 30 | 31 | export const UNASSIGN_PAW_REQUEST = 'UNASSIGN_PAW_REQUEST'; 32 | export const UNASSIGN_PAW_SUCCESS = 'UNASSIGN_PAW_SUCCESS'; 33 | export const UNASSIGN_PAW_FAILURE = 'UNASSIGN_PAW_FAILURE'; 34 | 35 | export const SELECT_PAW_ASSIGN = 'SELECT_PAW_ASSIGN'; 36 | export const SELECT_PAW_UNASSIGN = 'SELECT_PAW_UNASSIGN'; -------------------------------------------------------------------------------- /Server/src/Routes/OpenAPI.ts: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. 2 | // Licensed under the MIT license. 3 | 4 | import { hostname } from "os"; 5 | import * as swaggerUI from "swagger-ui-express" 6 | import { appVersion } from "../Startup/ConfigEngine"; 7 | import * as openAPIDoc from "../JSON/openAPI.json"; 8 | import type express from "express"; 9 | 10 | // Define the Swagger UI class that 11 | export class SwaggerUI { 12 | // Define the properties that will be available to the class 13 | private webServer: express.Express; 14 | 15 | // Define how the class should be instantiated 16 | constructor(webServer: express.Express) { 17 | 18 | // Make the express instance available to the class 19 | this.webServer = webServer; 20 | 21 | // Initialize the route 22 | this.initSwaggerUI(); 23 | }; 24 | 25 | // Initialize the Swagger UI middleware 26 | initSwaggerUI(): void { 27 | 28 | // Import environmental variables 29 | const port = process.env.PSM_PORT || 3000; 30 | 31 | // Set the app version in the API Doc 32 | openAPIDoc.info.version = appVersion; 33 | 34 | // Set the two host names in the API Doc 35 | openAPIDoc.servers[0].url = "https://" + hostname + ":" + port + "/" 36 | openAPIDoc.servers[1].url = "http://" + hostname + ":" + port + "/" 37 | 38 | // Initialize the Swagger UI middleware on the API endpoint 39 | this.webServer.use('/Docs', swaggerUI.serve); 40 | 41 | // Set the Swagger UI engine's default options 42 | const swaggerOptions: swaggerUI.SwaggerUiOptions = { 43 | // customCss: '.swagger-ui .topbar { display: none }', 44 | customSiteTitle: "Privileged Security Management - API Docs" 45 | }; 46 | 47 | // Specify the document to be served up on the SwaggerUI endpoint using the specified options 48 | this.webServer.get('/Docs', swaggerUI.setup(openAPIDoc, swaggerOptions)); 49 | } 50 | } -------------------------------------------------------------------------------- /User-Interface/public/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | 7 | 8 | 9 | 10 | 14 | 15 | 19 | 20 | 29 | Privileged Security Management (Private Preview) 30 | 31 | 32 | 33 |
34 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /Server/src/Utility/Utility.ts: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. 2 | // Licensed under the MIT license. 3 | 4 | // TODO: enhance debug console output with time stamps and other valuable data 5 | // Write debug data to the console if debug mode is turned on 6 | export function writeDebugInfo(object: any, message?: any): void { 7 | // Gather the debug mode setting from the current environmental variable set 8 | const debugMode = process.env.PSM_Debug || "false"; 9 | 10 | // If the debug mode value is "true" write to the console 11 | if (debugMode === "true") { 12 | // If the message parameter is not left blank, write it 13 | if (typeof message !== "undefined") { 14 | // Write the specified message to the console 15 | console.log("\n" + message); 16 | } else { 17 | // If no message was specified, write a whitespace to separate the object from the line above it 18 | console.log("\n"); 19 | }; 20 | // The the specified object to the console 21 | console.log(object); 22 | }; 23 | }; 24 | 25 | // Define the custom error structure for the app so that error handling can be well structured and in the future, automated. 26 | export class InternalAppError extends Error { 27 | // Define the initialization code for the class 28 | constructor(message: string, name?: string, trace?: string) { 29 | // Satisfy the requirements of the parent class by passing the error message to it upon initialization 30 | super(message) 31 | 32 | // If present, set the values 33 | if (typeof name === "string") {this.name = name}; 34 | if (typeof trace === "string") {this.stack = trace}; 35 | 36 | // Log the error on error creation/instantiation 37 | this.logError(); 38 | }; 39 | 40 | // TODO: Add an error reporting engine 41 | private reportError() {}; 42 | 43 | // TODO: Write the error logging logic (console/disk/wherever) 44 | private logError() { 45 | console.error(this.message); 46 | }; 47 | }; -------------------------------------------------------------------------------- /.github/workflows/codeql-analysis.yml: -------------------------------------------------------------------------------- 1 | name: "CodeQL" 2 | 3 | on: 4 | push: 5 | branches: [ main ] 6 | pull_request: 7 | # The branches below must be a subset of the branches above 8 | branches: [ main ] 9 | schedule: 10 | - cron: '44 18 * * 1' 11 | 12 | jobs: 13 | analyze: 14 | name: Analyze 15 | runs-on: ubuntu-latest 16 | 17 | strategy: 18 | fail-fast: false 19 | matrix: 20 | language: [ 'javascript' ] 21 | # CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python' ] 22 | # Learn more: 23 | # https://docs.github.com/en/free-pro-team@latest/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#changing-the-languages-that-are-analyzed 24 | 25 | steps: 26 | - name: Checkout repository 27 | uses: actions/checkout@v3 28 | 29 | # Initializes the CodeQL tools for scanning. 30 | - name: Initialize CodeQL 31 | uses: github/codeql-action/init@v2 32 | with: 33 | languages: ${{ matrix.language }} 34 | # If you wish to specify custom queries, you can do so here or in a config file. 35 | # By default, queries listed here will override any specified in a config file. 36 | # Prefix the list here with "+" to use these queries and those in the config file. 37 | queries: +security-and-quality 38 | 39 | # Autobuild attempts to build any compiled languages (C/C++, C#, or Java). 40 | # If this step fails, then you should remove it and run the build manually (see below) 41 | - name: Autobuild 42 | uses: github/codeql-action/autobuild@v2 43 | 44 | # ℹ️ Command-line programs to run using the OS shell. 45 | # 📚 https://git.io/JvXDl 46 | 47 | # ✏️ If the Autobuild fails above, remove it and uncomment the following three lines 48 | # and modify them (or add more) to build your code if your project 49 | # uses a compiled language 50 | 51 | #- run: | 52 | # make bootstrap 53 | # make release 54 | 55 | - name: Perform CodeQL Analysis 56 | uses: github/codeql-action/analyze@v2 57 | -------------------------------------------------------------------------------- /User-Interface/src/components/LeftNav/LeftNav.tsx: -------------------------------------------------------------------------------- 1 | import * as React from 'react'; 2 | import { Nav, INavStyles, INavLinkGroup } from '@fluentui/react/lib/Nav'; 3 | 4 | const navStyles: Partial = { root: { width: 300 } }; 5 | 6 | const navLinkGroups: INavLinkGroup[] = [ 7 | { 8 | name: 'Main', 9 | expandAriaLabel: 'Expand Main section', 10 | collapseAriaLabel: 'Collapse Main section', 11 | links: [ 12 | { 13 | key: 'Home', 14 | name: 'Home', 15 | url: '/', 16 | }, 17 | { 18 | key: 'All PAWs', 19 | name: 'All PAWs', 20 | url: '/devices', 21 | }, 22 | { 23 | key: 'User Management', 24 | name: 'User Management', 25 | url: '#', 26 | }, 27 | { 28 | key: 'Silo Management', 29 | name: 'Silo Management', 30 | url: '#', 31 | }, 32 | { 33 | key: 'Privileged Secure Score', 34 | name: 'Privileged Secure Score', 35 | url: '#', 36 | } 37 | ], 38 | }, 39 | { 40 | name: 'Settings', 41 | expandAriaLabel: 'Expand Settings section', 42 | collapseAriaLabel: 'Collapse Settings section', 43 | links: [ 44 | { 45 | key: 'General', 46 | name: 'General', 47 | url: '#', 48 | }, 49 | { 50 | key: "Access control (IAM)", 51 | name: "Access control (IAM)", 52 | url: "#" 53 | }, 54 | { 55 | key: 'Naming Format', 56 | name: 'Naming Format', 57 | url: '#', 58 | } 59 | ], 60 | }, 61 | { 62 | name: 'Support + troubleshooting', 63 | expandAriaLabel: 'Expand Troubleshooting + Support section', 64 | collapseAriaLabel: 'Collapse Troubleshooting + Support section', 65 | links: [ 66 | { 67 | key: 'New support request', 68 | name: 'New support request', 69 | url: 'mailto:elliot.huffman@microsoft.com', 70 | } 71 | ], 72 | }, 73 | ]; 74 | 75 | export const LeftNav: React.FunctionComponent = () => { 76 | return ( 77 |