Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
garrytrinder committed Jul 3, 2024
1 parent 6b272c4 commit 3437250
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion samples/improve-app-security-graph/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ A common approach to security is to apply the principle of least privilege (PoLP
To check your access token for excessive permissions locally:

1. Start the local web server, `npm start`
1. Start Dev Proxy in recording mode, `devproxy -c .devproxy\excessive-permissions.json -u "https://graph.microsoft.com/*" --record`
1. Start Dev Proxy in recording mode, `devproxy -c .devproxy/excessive-permissions.json -u "https://graph.microsoft.com/*" --record`
1. Navigate to `http://localhost:3000`, login and wait for the table to be populated
1. Stop recording mode, press <kbd>S</kdb>
1. Stop Dev Proxy, press <kbd>Ctrl</kbd> + <kbd>C</kbd>
Expand Down
2 changes: 1 addition & 1 deletion samples/improve-app-security-graph/scripts/fix.sh
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ appId=$(echo "$envJs" | head -n 1 | cut -d "'" -f 2)
# replace scopes values in env.js
echo "Replacing scopes in env.js..."
newScope='const scopes = ["https://graph.microsoft.com/Tasks.Read"];'
sed -i '' "s/const scopes = \[.*\];/$newScope/" $filePath
sed -i '' "s|const scopes = \[.*\];|$newScope|" $filePath

# get service principal id
echo "Getting service principal id..."
Expand Down
2 changes: 1 addition & 1 deletion samples/improve-app-security-graph/scripts/reset.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ appId=$(echo "$envJs" | head -n 1 | cut -d "'" -f 2)
# replace scopes values in env.js
echo "Replacing scopes in env.js..."
newScope='const scopes = ["https://graph.microsoft.com/Group.ReadWrite.All"];'
sed -i '' "s/const scopes = \[.*\];/$newScope/" $filePath
sed -i '' "s|const scopes = \[.*\];|$newScope|" $filePath

# get service principal id
echo "Getting service principal id..."
Expand Down

0 comments on commit 3437250

Please sign in to comment.