Skip to content

Commit

Permalink
update hook, document required config variables in custom config.
Browse files Browse the repository at this point in the history
  • Loading branch information
eashaw committed Dec 16, 2024
1 parent a715700 commit 0e67737
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 3 deletions.
6 changes: 3 additions & 3 deletions ee/bulk-operations-dashboard/api/hooks/entra-sso/index.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
/**
* Module dependencies
*/
const { ConfidentialClientApplication } = require('@azure/msal-node');
const jwt = require('jsonwebtoken');
let { ConfidentialClientApplication } = require('@azure/msal-node');
let jwt = require('jsonwebtoken');

/**
* Entra SSO Hook
Expand Down Expand Up @@ -79,7 +79,7 @@ module.exports = function (sails) {
routes: {
before: {
'/login': async (req, res) => {
// Get the sso login url
// Get the sso login url and redirect the user
// [?]: https://learn.microsoft.com/en-us/javascript/api/%40azure/msal-node/confidentialclientapplication?view=msal-js-latest#@azure-msal-node-confidentialclientapplication-getauthcodeurl
let entraAuthorizationUrl = await entraSSOClient.getAuthCodeUrl({
redirectUri: `${sails.config.custom.baseUrl}/authorization-code/callback`,
Expand Down
15 changes: 15 additions & 0 deletions ee/bulk-operations-dashboard/config/custom.js
Original file line number Diff line number Diff line change
Expand Up @@ -107,4 +107,19 @@ module.exports.custom = {
// [?] Here's how you get one: https://fleetdm.com/docs/using-fleet/fleetctl-cli#get-the-api-token-of-an-api-only-user
// fleetApiToken: 'asdfasdfasdfasdf',


/**************************************************************************
* *
* Entra SSO configuration *
* *
**************************************************************************/
// entraTenantId: '...', // « The tenant ID of this application in the Microsoft Entra dashboard.
// entraClientId: '...', // « The Application (client) ID of this application in the Microsoft Entra dashboard.
// entraClientSecret: '...', //« The client secret for the application that has been created for this dashboard.
//--------------------------------------------------------------------------
// /\ Configure these to replace the built-in authentication with Microsoft Entra SSO.
// ||
//--------------------------------------------------------------------------


};

0 comments on commit 0e67737

Please sign in to comment.