From 22c59e83644cd112a898459f5cdf58a3f9346265 Mon Sep 17 00:00:00 2001 From: Brendon Kupsch <98063893+BrendonKupsch1@users.noreply.github.com> Date: Mon, 11 Nov 2024 17:30:54 -0500 Subject: [PATCH 001/163] New cert and key --- backend/2024_InCommonCA.crt | 93 +++++++++++++++++++ .../2024_facelect.capping.ecrl.marist.edu.crt | 39 ++++++++ backend/facelect.capping.ecrl.marist.edu.key | 27 ++++++ backend/sp-cert.pem | 19 ---- backend/sp-key.pem | 30 ------ server.js | 78 +++++++++++++++- 6 files changed, 233 insertions(+), 53 deletions(-) create mode 100644 backend/2024_InCommonCA.crt create mode 100644 backend/2024_facelect.capping.ecrl.marist.edu.crt create mode 100644 backend/facelect.capping.ecrl.marist.edu.key delete mode 100644 backend/sp-cert.pem delete mode 100644 backend/sp-key.pem diff --git a/backend/2024_InCommonCA.crt b/backend/2024_InCommonCA.crt new file mode 100644 index 0000000..a127bb7 --- /dev/null +++ b/backend/2024_InCommonCA.crt @@ -0,0 +1,93 @@ +-----BEGIN CERTIFICATE----- +MIIGSjCCBDKgAwIBAgIRAINbdhUgbS1uCX4LbkCf78AwDQYJKoZIhvcNAQEMBQAw +gYgxCzAJBgNVBAYTAlVTMRMwEQYDVQQIEwpOZXcgSmVyc2V5MRQwEgYDVQQHEwtK +ZXJzZXkgQ2l0eTEeMBwGA1UEChMVVGhlIFVTRVJUUlVTVCBOZXR3b3JrMS4wLAYD +VQQDEyVVU0VSVHJ1c3QgUlNBIENlcnRpZmljYXRpb24gQXV0aG9yaXR5MB4XDTIy +MTExNjAwMDAwMFoXDTMyMTExNTIzNTk1OVowRDELMAkGA1UEBhMCVVMxEjAQBgNV +BAoTCUludGVybmV0MjEhMB8GA1UEAxMYSW5Db21tb24gUlNBIFNlcnZlciBDQSAy +MIIBojANBgkqhkiG9w0BAQEFAAOCAY8AMIIBigKCAYEAifBcxDi60DRXr5dVoPQi +Q/w+GBE62216UiEGMdbUt7eSiIaFj/iZ/xiFop0rWuH4BCF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g4tqJVfMiWPPe +3M/vg4aijJRPn2jymJBGhCfHdr/jzDUsi14HZGWCwEiwqJH5YZ92IFCokcdmtet4 +YgNW8IoaE+oxox6gmf049vYnMlhvB/VruPsUK6+3qszWY19zjNoFmag4qMsXeDZR +rOme9Hg6jc8P2ULimAyrL58OAd7vn5lJ8S3frHRNG5i1R8XlKdH5kBjHYpy+g8cm +ez6KJcfA3Z3mNWgQIJ2P2N7Sw4ScDV7oL8kCAwEAAaOBwDCBvTAdBgNVHQ4EFgQU +oBEKIz6W8Qfs4q8p74Klf9AwpLQwDgYDVR0PAQH/BAQDAgEGMA8GA1UdEwEB/wQF +MAMBAf8wewYDVR0fBHQwcjA4oDagNIYyaHR0cDovL2NybC5jb21vZG9jYS5jb20v +QUFBQ2VydGlmaWNhdGVTZXJ2aWNlcy5jcmwwNqA0oDKGMGh0dHA6Ly9jcmwuY29t +b2RvLm5ldC9BQUFDZXJ0aWZpY2F0ZVNlcnZpY2VzLmNybDANBgkqhkiG9w0BAQUF +AAOCAQEACFb8AvCb6P+k+tZ7xkSAzk/ExfYAWMymtrwUSWgEdujm7l3sAg9g1o1Q +GE8mTgHj5rCl7r+8dFRBv/38ErjHT1r0iWAFf2C3BUrz9vHCv8S5dIa2LX1rzNLz +Rt0vxuBqw8M0Ayx9lt1awg6nCpnBBYurDC/zXDrPbDdVCYfeU0BsWO/8tqtlbgT2 +G9w84FoVxp7Z8VlIMCFlA2zs6SFz7JsDoeA3raAVGI/6ugLOpyypEBMs1OUIJqsi +l2D4kF501KKaU73yqWjgom7C12yxow+ev+to51byrvLjKzg6CYG1a4XXvi3tPxq3 +smPi9WIsgtRqAEFQ8TmDn5XpNpaYbg== +-----END CERTIFICATE----- diff --git a/backend/2024_facelect.capping.ecrl.marist.edu.crt b/backend/2024_facelect.capping.ecrl.marist.edu.crt new file mode 100644 index 0000000..a06b416 --- /dev/null +++ b/backend/2024_facelect.capping.ecrl.marist.edu.crt @@ -0,0 +1,39 @@ +-----BEGIN CERTI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s2YCdLoArgb3NeqN +H1IaU6hDkv4Wxgg1q5g344AqR8ewlSS9vN9QtKFhrF4JnyPi+WCcqCjTPNsmVlbF +MV2IfrkvQNtEVZK+yi0O3HJCg4aGq1tEDM+RM3c/3YlpWpnNsk0DdVxhWkmSBKvV +nzFJfz8dAHMp+l4avU80DJiT1KwcWUq/06JJnvNrZb9VY92GeqaVXflGcmnH+vrE +Cmfx7HCLckjYp8AvIytzaP4Y/HwkKzTHLIXA4/wuZ726/HO/205y +-----END CERTIFICATE----- diff --git a/backend/facelect.capping.ecrl.marist.edu.key b/backend/facelect.capping.ecrl.marist.edu.key new file mode 100644 index 0000000..f537640 --- /dev/null +++ b/backend/facelect.capping.ecrl.marist.edu.key @@ -0,0 +1,27 @@ +-----BEGIN RSA PRIVATE KEY----- +MIIEpAIBAAKCAQEAplsDVAExKCh5KMTZrmq6I5LNznLw6/5nLZYw8dVOqmSeToXc +I/q4UFUiQT+tafU6IKoIGP7D7JjFhXTV/RRCsIj1QxvF6JW4cPBeyPGngnTGcswx +UDHHSI0yGRxNEoalKvzbeHqVoQguDUtMYFFfSHnekhDdEs3pB9x81OOwx6j/KmDq +tOYRtjDY5f4Vzaa5QIyEzUi5IGsr73kGKACWICeCQBpE4czCI4jLnjytUzrhhsHw +itJp1A6Daphjb4upR7ju/kimv0cHXH+ffB6CmCbiu6bHnw13XLcAD+vctqHloCYv +taa1xA8W7sdOW3dFs5MXkmd6/GP8mo94fuvIxQIDAQABAoIBAHBXkj3OuEWoX3n6 +xg6VoLKZV0cONEkK+t68SL1oEcHcRVQ97daWYJZPh9yMhi3CH8kjSmim0+UZnnpr +1n8ciZTySL9TKCnTwkTy7u/A0iC1f7bS0pKXqz8Bq01t4Vabezs2m3gXQKkI/yCX +MzLwgOpO8tGtdb5XNAHNErgqM54BGYmT1Ihlyxx+nCL4Rd29NxB/sN3SU5NAaVOk +voGGlVhKLK2W4NXruGFS7dFm55MUhfRUcroDxWQ2sibyhuEngUAeyEnayT8ZNJE2 +JeA4tUU2tHXHnYmFcFVHPbINPX+iv3EV1J+WNux8+Rulkf0FtTqs/d6eleqH4NrZ +WVNHv5kCgYEA2ShxDL37tTb9BsfUrpvJNweaBA5SxI9M7QDkareSTNIg3PsUHzUZ +JpNOKmpuvAO6imvqhmXNET05AX5d2ErE/hmnX7ng1WIxlgefOiGDW+M9fXOdAAwG +Rl1YYjY2eZhZWOA0thwH2qARJMmO4lxf1w7ds4+hTazMnwYHfsLpSj8CgYEAxBxa +Afbm6q8b/Gc56BRn0T+tALs9iIfi9CoK1jG2JR/8adT2VJ12bnmMEMdnNVtS5KEa +fpJr7XnsewHA+Ima6gW6m7MfKT0j85oz3j4wvDgEm1Cw5wu0kd5GRVIP5ubkUFcC +Y87vXrqCvk2gFu37wkItmJqHCGmTTAbK1zLew/sCgYEAt/hD9diJgpcoOvNWIerG +x4EAIMmFoxIHyI1F9Ya5Qa2Ou8dV365bNUv8H4D1eQDrqtML53odBarJPZOxq0iE +pQRUwIs3h27dtU2Vvmif4VudP0ePzXdiZYA1HVbyRYckwl+HKHSMztFmVLURAIHj +i80DU1it/aET5PD1rpUvkH8CgYAMgU5P/8F7x4y+TIrJvLteAXRzrnze/uM+9Ita +WzMlLOP4j6bhgGTz6HZA/6YaJeekQo2g8o9FRlgJA/SdJJEnSRQ8J3DePVLUjsmt +60NKTTwl90BAi2OJRaYvd2siKyj14oZ5fNGQtc3uep6xt50tJvEnYPspUyocV/aJ +QGoqDwKBgQC5JzmlXPWm63P32GnBPCp5EZuuestWfctNwqMfQfRWOUBTMzXmBTCs +l7qZ4BjfCecA07ksmbamtGXasm7S3TupACZdi2MhGZ+Yb3DJWr2o46i9AQuKBqJ1 +nB0U5vVwdgYTBavIozEOts/UeyZmLw2S1mQADC/6m3HLDcD6by8qTQ== +-----END RSA PRIVATE KEY----- \ No newline at end of file diff --git a/backend/sp-cert.pem b/backend/sp-cert.pem deleted file mode 100644 index 26e995d..0000000 --- a/backend/sp-cert.pem +++ /dev/null @@ -1,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GoKn4 -Ln7zMYNsMdY0t/KwCELvqIlLIOoU9eA7YceWClQ5KYGIFErpBnWTqb8WupY= ------END CERTIFICATE REQUEST----- \ No newline at end of file diff --git a/backend/sp-key.pem b/backend/sp-key.pem deleted file mode 100644 index 7560b32..0000000 --- a/backend/sp-key.pem +++ /dev/null @@ -1,30 +0,0 @@ ------BEGIN ENCRYPTED PRIVATE KEY----- -MIIFLTBXBgkqhkiG9w0BBQ0wSjApBgkqhkiG9w0BBQwwHAQIBQ6vxee4zEkCAggA -MAwGCCqGSIb3DQIJBQAwHQYJYIZIAWUDBAEqBBBHJv2WwFrApJHix5FqimTbBIIE -0NN7hVnr1dcMKFFf2c088pNWrTbpMprBm4jb+WXchnFYN3RkV4ANp8H/JRmPgYON -/6343dK4LMOzoCf30MRSKyq2QGVx1OJxyiZsxe/kECEMK/64Xx0Dl7uWbPUKGOpK -v6HfduiWRdJfQmfudEWu9V6DYTvGnS1nRqK0UozxUeT+dW8V+0fmdoDYPfma+Ipi -VScR0VeQdd7Kv2CT7z9wy3ftlpRPS56N4WUxst8ONT2ZGRzNPApQqUO96887VYm8 -A+WNwzq1Dj383+ZH7DVjMUahfUn0T+0xv1qDokmZDqcWGc2n9mP+fY6ocHXiPlwc -fOmh87ASpF6tCXywCQ9UpCyqz6KvojAzRDpqWuquL/OlCK3d81W9T3QDhtL2PAwJ -HmML+8p/GjX9fh2ItMkl+DF2EgFRonqy3ASGsc4SxvEXk5iaVJohH+uoS3wuKSz8 -v2M+sNjki0bxE+bEASvety3c6eOUn0/l03gZjaA91gmqdSwdCzwWksUX5vLvVSuE -L2PfdxWgVubFur/zTiDaQqwi3HvEKiNfmH5oqT5p+QT3VYuRGhII21CTQlfwa65H -ptehA/7Q/eKRfhMivBcbNnPV1zVFeuSkcvQgZykw+1QT5DvBMQ9Hzxqny6dr431d -B0HzzWYh6qlXaL22Ccm+QwLeggkZugf9a12/LrAwCCKUVIdYrgF2y6hhwrCU435n -wbUs7gvDtfnAQ3MKhniOCwIsS2VRzBx/CC4V1JlGsMvo1SEGwNYlU7u/TNuEBMVT -VrLZqnutvt1UY9V5PurhP1xiR/hdTY0NSHnLpPrTFNu6iQABgTWc2wKOCcg2A5qc -6coo0XIrBTSWH99t/6tPVNhJg7ynh8+jGmtaIMS3lk/XKP1cugOVfzvswdL9nBAQ -nBWBJ6dv6XQbTHRdJa47xsHmkZFars6lWGnICBJ8FXsRdW7YkHovV4p4k4jgE7XO -EJe8n0uclMhc3uba8hGVCEUK58HPxantpFwPEr+Dva3Gimr6/qEl1FrdWNzY2lLU -P9OYK5002w5nzcC8lou0868r7UR+hRlqfYiLVkwrL0dCaal6RO4wQ9iNSkyusW8e -0ZuBGmd/c7snUJHluK32K0Afzyg8w6BC19nS1UUOZenaRwodMVXkQNfcDVg0luxB -eu77U74DLDJzj1oJIT3GQGqHcpGjxfs41BdnmKc8H+C7V5csm6kqnY4pCskzlZc/ -B89pIbjw9C8R9X1Hp5zrVnyoYe8fBizxY+qJu3NjD9QuEjR2h3fgo96VrYHNuxlV -rhJ+ga0EQjjR72aeQZvmCd/kWzFAhl9JPvGLfO9yDzWKtu4KiepoHpZBmFulaWNy -g7gkyUIONkrlW+kiObsS5s8aJeP8OBaiIaPOTX5Me1tGV5LCZ7R39Et8vDaHEGNG -Jd01qBXvglQhkkhltdVkwbZnlpsnZvTs6eUkxGVmnQocAci7Wz+5XfUugAsBQck3 -iXO7fEHCuyTnSV/oAGnPm2biDk3dwni2PB707e62uI65mjJyW1AnCHN5INbDcsn8 -yjv1TAjcJ74pnkjN0cZF6478S3bWIJF4QoEGovG9RFS7m+tI7wGeZKWV5p4eJx4S -8vAPgDapiEGhA5liu4+x2aLf1/DJPuhVDIjzagGLTbAn ------END ENCRYPTED PRIVATE KEY----- \ No newline at end of file diff --git a/server.js b/server.js index 9620dce..31571e5 100644 --- a/server.js +++ b/server.js @@ -3,11 +3,20 @@ const express = require('express'); const cors = require('cors'); const crypto = require('crypto'); // Import the crypto module const { client, connectDB } = require('./db/connection'); // Import the client and connectDB +const https = require('https'); +const fs = require('fs'); +const passport = require('passport'); +const SamlStrategy = require('passport-saml').Strategy; +const session = require('express-session'); const app = express(); // List of allowed origins -const allowedOrigins = ['http://localhost:3000', 'http://10.11.29.103:3000', 'http://facelect.capping.ecrl.marist.edu:3000']; +const allowedOrigins = [ + 'https://localhost:3443', + 'https://10.11.29.103:3000', + 'https://facelect.capping.ecrl.marist.edu:3000' +]; // Configure CORS to allow requests from your React app app.use(cors({ @@ -24,6 +33,18 @@ app.use(cors({ app.use(express.json()); // Parse incoming JSON data +// Configure session middleware +app.use(session({ + secret: 'your-secret-key', // Replace with a strong secret key + resave: false, + saveUninitialized: true, + cookie: { secure: process.env.NODE_ENV === 'production' } // Ensure cookies are only used over HTTPS in production +})); + +// Initialize Passport and restore authentication state, if any, from the session +app.use(passport.initialize()); +app.use(passport.session()); + // Connect to the PostgreSQL database connectDB(); @@ -32,6 +53,32 @@ const hashPassword = (password) => { return crypto.createHash('sha256').update(password).digest('hex'); }; +// Passport SAML strategy configuration +passport.use(new SamlStrategy( + { + path: '/login/callback', + entryPoint: 'https://auth.it.marist.edu/idp', + issuer: 'Marist-SSO', + cert: fs.readFileSync('./backend/2024_FACELECT.CAPPING.ECRL.MARIST.EDU.CRT', 'utf-8'), + }, + function(profile, done) { + findByEmail(profile.email, function(err, user) { + if (err) { + return done(err); + } + return done(null, user); + }); + }) +); + +passport.serializeUser((user, done) => { + done(null, user); +}); + +passport.deserializeUser((user, done) => { + done(null, user); +}); + // Route to handle admin login app.post('/admin-login', async (req, res) => { const { username, password } = req.body; // Capture username and password from request @@ -83,7 +130,30 @@ app.get('/faculty', async (req, res) => { } }); -// Start server -app.listen(3001, () => { - console.log('Server is running on port 3001'); +// SSO login route +app.get('/login', passport.authenticate('saml', { + successRedirect: '/', + failureRedirect: '/login' +})); + +// SSO callback route +app.post('/login/callback', passport.authenticate('saml', { + failureRedirect: '/login', + failureFlash: true +}), (req, res) => { + res.redirect('/'); +}); + +// Read SSL certificate and key +const options = { + key: fs.readFileSync('./backend/FACELECT.CAPPING.ECRL.MARIST.EDU.KEY'), + cert: fs.readFileSync('./backend/2024_FACELECT.CAPPING.ECRL.MARIST.EDU.CRT'), + ca: [ + fs.readFileSync('./backend/2024_INCOMMONCA.CRT') + ] +}; + +// Create HTTPS server on port 3000 +https.createServer(options, app).listen(3443, () => { + console.log('HTTPS Server running on port 3443'); }); \ No newline at end of file From abb13106e43ec8f2bafc38cca78314785c116e54 Mon Sep 17 00:00:00 2001 From: Brendon Kupsch Date: Wed, 13 Nov 2024 20:00:54 -0500 Subject: [PATCH 002/163] https is working, server is not --- server-ssl.js | 156 -------------------------------------------------- server.js | 18 +++--- 2 files changed, 9 insertions(+), 165 deletions(-) delete mode 100644 server-ssl.js diff --git a/server-ssl.js b/server-ssl.js deleted file mode 100644 index ed38e80..0000000 --- a/server-ssl.js +++ /dev/null @@ -1,156 +0,0 @@ -require('dotenv').config(); // Load environment variables -const express = require('express'); -const cors = require('cors'); -const crypto = require('crypto'); // Import the crypto module -const { client, connectDB } = require('./db/connection'); // Import the client and connectDB -const https = require('https'); -const fs = require('fs'); -const passport = require('passport'); -const SamlStrategy = require('passport-saml').Strategy; -const session = require('express-session'); - -const app = express(); - -// List of allowed origins -const allowedOrigins = [ - 'https://localhost:3000', - 'https://10.11.29.103:3000', - 'https://facelect.capping.ecrl.marist.edu:3000' -]; - -// Configure CORS to allow requests from your React app -app.use(cors({ - origin: function (origin, callback) { - // Allow requests with no origin (like mobile apps or curl requests) - if (!origin) return callback(null, true); - if (allowedOrigins.indexOf(origin) === -1) { - const msg = 'The CORS policy for this site does not allow access from the specified Origin.'; - return callback(new Error(msg), false); - } - return callback(null, true); - } -})); - -app.use(express.json()); // Parse incoming JSON data - -// Configure session middleware -app.use(session({ - secret: 'your-secret-key', // Replace with a strong secret key - resave: false, - saveUninitialized: true, - cookie: { secure: process.env.NODE_ENV === 'production' } // Ensure cookies are only used over HTTPS in production -})); - -// Initialize Passport and restore authentication state, if any, from the session -app.use(passport.initialize()); -app.use(passport.session()); - -// Connect to the PostgreSQL database -connectDB(); - -// Function to hash passwords using SHA-256 -const hashPassword = (password) => { - return crypto.createHash('sha256').update(password).digest('hex'); -}; - -// Passport SAML strategy configuration -passport.use(new SamlStrategy( - { - path: '/login/callback', - entryPoint: 'https://auth.it.marist.edu/idp', - issuer: 'Marist-SSO', - cert: fs.readFileSync('./backend/sp-cert.pem', 'utf-8'), - }, - function(profile, done) { - findByEmail(profile.email, function(err, user) { - if (err) { - return done(err); - } - return done(null, user); - }); - }) - ); - -passport.serializeUser((user, done) => { - done(null, user); -}); - -passport.deserializeUser((user, done) => { - done(null, user); -}); - -// Route to handle admin login -app.post('/admin-login', async (req, res) => { - const { username, password } = req.body; // Capture username and password from request - - try { - // Query the Admins table to find the admin by username (Uname) - const adminResult = await client.query('SELECT * FROM Admins WHERE Uname = $1', [username]); - - if (adminResult.rows.length === 0) { - return res.status(400).json({ message: 'Invalid username or password' }); - } - - const admin = adminResult.rows[0]; - - // Hash the provided password and compare with the stored hash - const hashedInputPassword = hashPassword(password); // Hash the input password - if (hashedInputPassword !== admin.thepassword) { // Use correct case for ThePassword - return res.status(400).json({ message: 'Invalid username or password' }); - } - - // If successful, return a success message (can also return user data if needed) - res.json({ message: 'Login successful', admin: { AID: admin.AID, Uname: admin.Uname, Godmode: admin.Godmode } }); - } catch (err) { - console.error('Error during login:', err); - res.status(500).json({ message: 'Server error' }); - } -}); - -// Example existing route for fetching faculty data (unchanged) -app.get('/faculty', async (req, res) => { - try { - const result = await client.query(` - SELECT - faculty.fid, - faculty.email, - faculty.ishidden, - faculty.prefname, - faculty.url, - faculty.thestatement, - faculty.lastupdated, - schools.sname AS sname - FROM faculty - LEFT JOIN schools ON faculty.schoolid = schools.sid; - `); - res.json(result.rows); - } catch (err) { - console.error('Database query error:', err); - res.status(500).send('Error querying the database'); - } -}); - -// SSO login route -app.get('/login', passport.authenticate('saml', { - successRedirect: '/', - failureRedirect: '/login' -})); - -// SSO callback route -app.post('/login/callback', passport.authenticate('saml', { - failureRedirect: '/login', - failureFlash: true -}), (req, res) => { - res.redirect('/'); -}); - -// Read SSL certificate and key -const options = { - key: fs.readFileSync('./backend/sp-key.pem'), - cert: fs.readFileSync('./backend/sp-cert.pem') -}; - -// Create HTTPS server -https.createServer(options, app).listen(3001, () => { - console.log('HTTPS Server running on port 3001'); -}); \ No newline at end of file diff --git a/server.js b/server.js index 31571e5..d2bb24a 100644 --- a/server.js +++ b/server.js @@ -13,9 +13,9 @@ const app = express(); // List of allowed origins const allowedOrigins = [ - 'https://localhost:3443', - 'https://10.11.29.103:3000', - 'https://facelect.capping.ecrl.marist.edu:3000' + 'https://localhost:443', + 'https://10.11.29.103:443', + 'https://facelect.capping.ecrl.marist.edu:443' ]; // Configure CORS to allow requests from your React app @@ -59,7 +59,7 @@ passport.use(new SamlStrategy( path: '/login/callback', entryPoint: 'https://auth.it.marist.edu/idp', issuer: 'Marist-SSO', - cert: fs.readFileSync('./backend/2024_FACELECT.CAPPING.ECRL.MARIST.EDU.CRT', 'utf-8'), + cert: fs.readFileSync('./backend/2024_facelect.capping.ecrl.marist.edu.crt', 'utf-8'), }, function(profile, done) { findByEmail(profile.email, function(err, user) { @@ -146,14 +146,14 @@ app.post('/login/callback', passport.authenticate('saml', { // Read SSL certificate and key const options = { - key: fs.readFileSync('./backend/FACELECT.CAPPING.ECRL.MARIST.EDU.KEY'), - cert: fs.readFileSync('./backend/2024_FACELECT.CAPPING.ECRL.MARIST.EDU.CRT'), + key: fs.readFileSync('./backend/facelect.capping.ecrl.marist.edu.key'), + cert: fs.readFileSync('./backend/2024_facelect.capping.ecrl.marist.edu.crt'), ca: [ - fs.readFileSync('./backend/2024_INCOMMONCA.CRT') + fs.readFileSync('./backend/2024_InCommonCA.crt') ] }; // Create HTTPS server on port 3000 -https.createServer(options, app).listen(3443, () => { - console.log('HTTPS Server running on port 3443'); +https.createServer(options, app).listen(443, () => { + console.log('HTTPS Server running on port 443'); }); \ No newline at end of file From 51d20881ef067168c6bd0983711373b3d942e7c3 Mon Sep 17 00:00:00 2001 From: Brendon Kupsch Date: Sun, 17 Nov 2024 14:42:06 -0500 Subject: [PATCH 003/163] Started apache routing --- github_actions_ips.txt | Bin 0 -> 169062 bytes src/UserProfile.css | 3 ++- 2 files changed, 2 insertions(+), 1 deletion(-) create mode 100644 github_actions_ips.txt diff --git a/github_actions_ips.txt b/github_actions_ips.txt new file mode 100644 index 0000000000000000000000000000000000000000..05f53716e58e6c88034cab1ac0ee411d530418cc GIT binary patch literal 169062 zcmbV#S+*s|jU>POoZd>QNak3(Aw_ZjE9mZLX|y!J1A|9@NR$Y3IA*{-BJTUY|L4;$ z|MknSzkK@T+s8lu`^SI&_3{6|{PMql`ClLZmbCAQ_U%FY@&ozbzhLF}2le|0H}I~h zzy9*uKYN4zHLU*pk33o%_a!av`=n;h75)3i-r^qRCimYysIb6O^3NZV;@^uFt@ZgI zo}ztD8j)X3qm?S!*Iz!j`+YmCWLbXupnPrCftEdPIe+`mj=D(}dquQt+erWI*z-y2 z*ZzLkHLfLXTAS^c*Mios{dD*&t|e_+n|+hlf;O$~W&ZRdYo@h1EAzgf^=m&L@x-;i z{_^|BD&>@X&v+6o>zZkmE?U>wUv$K2lo#=d3Y6)ee&!?M@JUzh{p&~OR&;2Hd`8Xb z=)ZqZfyh>&gr9%f2#BnIL{JxCm{(a3*&p;zr5v;+=)V>8FaPAHD{AH+>sr<`=X}-> zwCDp>WAU!yEz{o#?k_j7fu6i|>X!`!cd)X3sbzhs&&pFHe_QM|7 z2ApOTEHMk5hM&w5a2Umto@8a@9gx~e(Y30 zRTcn>RRxIHzpWeomtv?xu)=^x6&~mk2wl}k%zmQPmFWu^e^eX|4Da-RrX+XOr9aao~g9;EyA-}PzwAvt5U6n z`&vzReAWAdZjV)7^&QN!Gf+lF26FrC9Y*Nv)FW`yH1pW3ImZ?!oS6sj64X^HS%3ei z{PIaHpC|B=T%b7`|~cG7bf3+StVtCnt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aucwQRpYw3$XZy{#o1PW_QrjdSZjE%yxZxbn zy?o&3c%E?n?seYRe@S%1-NXTAKE1~_^TXd~-QxiKZuh;3KSY%~^IWln^h{Wv99iFm zjx+fkUVgum22U<%w>!M^?G~>*xx?R0Z?roq&Kvu%(?8|G+k2?4n2zz!zd!z)UgbYk zVGup+_}dEap}D_bK~HNB{9UbW57@|2ce4U@*PYOw=%wQQd!Y) zafPj`jCk$=jgd)w_9ZDjn7p*->uMub*Fi}6TV;Zeh%sUpJnrJE`ucJ9hv(OOJ>L2w&Q^E+`1G=WeE-M}oda+6sD6uJwpH~T zHronE`<(}IGJ4aau)kN_?12@I#G9^$74P~vR@fgmKF11I(R~HK+_2`iE8g@E?(wF7 zaD}bA`{S>V`W8L7`-3aq^mDFwFO~gqtH+yYhg3ZG+)hheVLk3_<#(=bDg*a$?B4A0 zcIx9h^Y1*Er@otL$BK8+jur2s9V_gQn<&BT^s=6;`~{11sL^@h(5G$GiN% z?BhM|Y*js{Ms0-!m2ddlEws>I9}{1k$Zqxkw|5@Y{ Date: Sun, 17 Nov 2024 15:13:51 -0500 Subject: [PATCH 004/163] Site is now functional on https --- server.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/server.js b/server.js index d2bb24a..e9171dd 100644 --- a/server.js +++ b/server.js @@ -13,9 +13,9 @@ const app = express(); // List of allowed origins const allowedOrigins = [ - 'https://localhost:443', - 'https://10.11.29.103:443', - 'https://facelect.capping.ecrl.marist.edu:443' + 'https://localhost', + 'https://10.11.29.103', + 'https://facelect.capping.ecrl.marist.edu' ]; // Configure CORS to allow requests from your React app @@ -154,6 +154,6 @@ const options = { }; // Create HTTPS server on port 3000 -https.createServer(options, app).listen(443, () => { - console.log('HTTPS Server running on port 443'); -}); \ No newline at end of file +https.createServer(options, app).listen(3001, () => { + console.log('HTTPS Server running on port 3001'); +}); From 4675c214bdd283ccd9a496247ddf1d13d24153c5 Mon Sep 17 00:00:00 2001 From: Brendon Kupsch <98063893+BrendonKupsch1@users.noreply.github.com> Date: Tue, 19 Nov 2024 18:57:11 -0500 Subject: [PATCH 005/163] Revert "Site is now functional on https" This reverts commit 61494d1d9f02033965f7f18a6a59af0ace3cd238. --- server.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/server.js b/server.js index e9171dd..d2bb24a 100644 --- a/server.js +++ b/server.js @@ -13,9 +13,9 @@ const app = express(); // List of allowed origins const allowedOrigins = [ - 'https://localhost', - 'https://10.11.29.103', - 'https://facelect.capping.ecrl.marist.edu' + 'https://localhost:443', + 'https://10.11.29.103:443', + 'https://facelect.capping.ecrl.marist.edu:443' ]; // Configure CORS to allow requests from your React app @@ -154,6 +154,6 @@ const options = { }; // Create HTTPS server on port 3000 -https.createServer(options, app).listen(3001, () => { - console.log('HTTPS Server running on port 3001'); -}); +https.createServer(options, app).listen(443, () => { + console.log('HTTPS Server running on port 443'); +}); \ No newline at end of file From f5a0d3dc81057c998d5c8a51d714652621181ffb Mon Sep 17 00:00:00 2001 From: Brendon Kupsch <98063893+BrendonKupsch1@users.noreply.github.com> Date: Tue, 19 Nov 2024 18:58:35 -0500 Subject: [PATCH 006/163] Reverted to working commit --- server.js | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/server.js b/server.js index d2bb24a..14c0e49 100644 --- a/server.js +++ b/server.js @@ -13,9 +13,7 @@ const app = express(); // List of allowed origins const allowedOrigins = [ - 'https://localhost:443', - 'https://10.11.29.103:443', - 'https://facelect.capping.ecrl.marist.edu:443' + 'https://facelect.capping.ecrl.marist.edu' ]; // Configure CORS to allow requests from your React app @@ -154,6 +152,6 @@ const options = { }; // Create HTTPS server on port 3000 -https.createServer(options, app).listen(443, () => { - console.log('HTTPS Server running on port 443'); +https.createServer(options, app).listen(3001, () => { + console.log('HTTPS Server running on port 3001'); }); \ No newline at end of file From 512034c0c3eb8b929af32d773a86ce0e69524308 Mon Sep 17 00:00:00 2001 From: Brendon Kupsch <98063893+BrendonKupsch1@users.noreply.github.com> Date: Fri, 22 Nov 2024 01:22:11 -0500 Subject: [PATCH 007/163] Server.js sso testing --- backend/shibboleth.xml | 162 +++++++++++++++++++++++++++++++++++++++++ server.js | 10 +-- 2 files changed, 167 insertions(+), 5 deletions(-) create mode 100644 backend/shibboleth.xml diff --git a/backend/shibboleth.xml b/backend/shibboleth.xml new file mode 100644 index 0000000..2e10895 --- /dev/null +++ b/backend/shibboleth.xml @@ -0,0 +1,162 @@ + + + + + + + marist.edu + + + + + + + +MIIDZDCCAkygAwIBAgIEWUPr+jANBgkqhkiG9w0BAQsFADB0MQswCQYDVQQGEwJV +UzELMAkGA1UECAwCTlkxFTATBgNVBAcMDFBvdWdoa2VlcHNpZTEXMBUGA1UECgwO +TWFyaXN0IENvbGxlZ2UxCzAJBgNVBAsMAklUMRswGQYDVQQDDBJhdXRoLml0Lm1h +cmlzdC5lZHUwHhcNMTcwNjE2MTQzNDIzWhcNMjcwNjE2MTQzNDIzWjB0MQswCQYD +VQQGEwJVUzELMAkGA1UECAwCTlkxFTATBgNVBAcMDFBvdWdoa2VlcHNpZTEXMBUG +A1UECgwOTWFyaXN0IENvbGxlZ2UxCzAJBgNVBAsMAklUMRswGQYDVQQDDBJhdXRo +Lml0Lm1hcmlzdC5lZHUwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDE +43jyxC++dV0lYffBNFiMiSALRzZQIKRGGybuLobzyN7/ItAex9ABY36IKPQ7OPPt +sKofjX4VLcVpehiDAUeQpLOUIOWiEJ3+QBR7WPqGRLW2Hen3utApH1a1+iA5nzqE +uhpu0SMqC1g9Rt5m0ZGAuK+jT4KWfaEe18yphF8szpcVzwfAACr8cbYGSobMbOsz +DgcQnXS+m1qorsn7fLZOa6R4pve/G9YZunFAJXBdmkHGo8Rmd6s/kIgQJZIksqkZ +50gpDqzbIlKRYfHGroztjdGWcXkHUL7UXjUCNbQOvIvml4D8s2JtwgFRwkvo8BJ5 +KCKjJZQi9GZ3SRs4z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1UEAwwSYXV0aC5pdC5t +YXJpc3QuZWR1MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAtJ2+w3qC +xfsGp6w1tGj2cGmgrOV4AbUXxSkjtxiN4uM2KlvJPHly8TXVlA/qJ7vB6CmWGAyy +IEc6OS0NUE/sbU3MM8qRaBgvfarZCmClr0xIl0eLaDBdL9Srbyz56SyReQlvvnvR +CaHkdngVTOsxkf62G9jDPWRqhvLcVlZs0MqB57KqOeK+N4GK0pUnLudJI3bVYND8 +G8SZKZ6a0VNvVOw57puzBvrRsUsBLhmLw2zeC/8cNN82Yzhgl60b+U6N/9oK4Rfl +5nFu5yzfotgdK4p1FOJRduX1+2kueL2piqy2WpD9HmRGxVsgYnfVDheyHIvttdz6 +/ZG7Jrrie4ehzwIDAQABMA0GCSqGSIb3DQEBCwUAA4IBAQCHwNrdDPI+r2PWjA5R +GXNsBTAsEOmA8+lFGQjp4YkCXudmn/FHWT5uBcw+lLKOM6KS8TrDRAWr6UYAKNVU +SbgAPcY1rR0uCQ8fAvLvM6t5igUZLE1FwzNeLSV6ea5A7e828w5DQSQdoEY79SDG +TIjzs0V8I+r3AZI9EstmaO345HVU3kHFFVuBTNP5yHzzeXlqrPaCgOnsAWZsd2VV +tu3y3PgBWSJU1+1XnedtikbmqrQw2VzR0LUSq3CO1Eh5y82YHPVFL5Y6T15I5oyR +IlEf+60ae5V8mYuV4eXaYIImm3/IbYNchlMgPOOI30YYwGFLHqYS8BX/Ga0YoEOk +1R/Q + + + + + + + + + + + + + + diff --git a/server.js b/server.js index 14c0e49..3e4e628 100644 --- a/server.js +++ b/server.js @@ -55,9 +55,9 @@ const hashPassword = (password) => { passport.use(new SamlStrategy( { path: '/login/callback', - entryPoint: 'https://auth.it.marist.edu/idp', - issuer: 'Marist-SSO', - cert: fs.readFileSync('./backend/2024_facelect.capping.ecrl.marist.edu.crt', 'utf-8'), + entryPoint: 'https://auth.it.marist.edu/idp/profile/SAML2/Redirect/SSO', // Updated entry point + issuer: 'https://facelect.capping.ecrl.marist.edu', + cert: fs.readFileSync('./backend/2024_facelect.capping.ecrl.marist.edu.crt', 'utf-8'), // Replace with the path to your IdP certificate }, function(profile, done) { findByEmail(profile.email, function(err, user) { @@ -130,7 +130,7 @@ app.get('/faculty', async (req, res) => { // SSO login route app.get('/login', passport.authenticate('saml', { - successRedirect: '/', + successRedirect: '/user-profile', failureRedirect: '/login' })); @@ -139,7 +139,7 @@ app.post('/login/callback', passport.authenticate('saml', { failureRedirect: '/login', failureFlash: true }), (req, res) => { - res.redirect('/'); + res.redirect('/user-profile'); }); // Read SSL certificate and key From d447a189c7949273da82f4481c01a8560c77e9cb Mon Sep 17 00:00:00 2001 From: Brendon Kupsch <98063893+BrendonKupsch1@users.noreply.github.com> Date: Fri, 22 Nov 2024 01:43:36 -0500 Subject: [PATCH 008/163] Readded idp_metadata because it vanished --- backend/{shibboleth.xml => idp_metadata.xml} | 0 server.js | 2 +- 2 files changed, 1 insertion(+), 1 deletion(-) rename backend/{shibboleth.xml => idp_metadata.xml} (100%) diff --git a/backend/shibboleth.xml b/backend/idp_metadata.xml similarity index 100% rename from backend/shibboleth.xml rename to backend/idp_metadata.xml diff --git a/server.js b/server.js index 3e4e628..9534420 100644 --- a/server.js +++ b/server.js @@ -57,7 +57,7 @@ passport.use(new SamlStrategy( path: '/login/callback', entryPoint: 'https://auth.it.marist.edu/idp/profile/SAML2/Redirect/SSO', // Updated entry point issuer: 'https://facelect.capping.ecrl.marist.edu', - cert: fs.readFileSync('./backend/2024_facelect.capping.ecrl.marist.edu.crt', 'utf-8'), // Replace with the path to your IdP certificate + cert: fs.readFileSync('./backend/idp_metadata.xml', 'utf-8'), // Replace with the path to your IdP certificate }, function(profile, done) { findByEmail(profile.email, function(err, user) { From a463cdd7ecb141988db432b37fde90518463207e Mon Sep 17 00:00:00 2001 From: Brendon Kupsch <98063893+BrendonKupsch1@users.noreply.github.com> Date: Fri, 22 Nov 2024 01:46:20 -0500 Subject: [PATCH 009/163] Removed unnecesary comments --- server.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server.js b/server.js index 9534420..4fa1801 100644 --- a/server.js +++ b/server.js @@ -55,9 +55,9 @@ const hashPassword = (password) => { passport.use(new SamlStrategy( { path: '/login/callback', - entryPoint: 'https://auth.it.marist.edu/idp/profile/SAML2/Redirect/SSO', // Updated entry point + entryPoint: 'https://auth.it.marist.edu/idp/profile/SAML2/Redirect/SSO', issuer: 'https://facelect.capping.ecrl.marist.edu', - cert: fs.readFileSync('./backend/idp_metadata.xml', 'utf-8'), // Replace with the path to your IdP certificate + cert: fs.readFileSync('./backend/idp_metadata.xml', 'utf-8'), }, function(profile, done) { findByEmail(profile.email, function(err, user) { From 31f684ffaf28b584f280749d38522e94b2396208 Mon Sep 17 00:00:00 2001 From: Brendon Kupsch <98063893+BrendonKupsch1@users.noreply.github.com> Date: Fri, 22 Nov 2024 01:49:32 -0500 Subject: [PATCH 010/163] Testing sso button functionality --- src/Login.tsx | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/Login.tsx b/src/Login.tsx index 07c6197..9d6ffea 100644 --- a/src/Login.tsx +++ b/src/Login.tsx @@ -1,21 +1,25 @@ import React from 'react'; import './Login.css'; import backgroundImage from './assets/background.jpg'; -import logoImage from './assets/logo.png' +import logoImage from './assets/logo.png'; import Footer from './components/footer/footer'; function Login() { + const handleSSOLogin = () => { + window.location.href = '/login'; // Redirect to the SSO login route + }; + return ( ); } -export default Login; +export default Login; \ No newline at end of file From 2f10db813afcf34e0d1a4d20500490e495685719 Mon Sep 17 00:00:00 2001 From: Brendon Kupsch <98063893+BrendonKupsch1@users.noreply.github.com> Date: Fri, 22 Nov 2024 02:08:22 -0500 Subject: [PATCH 011/163] SSO button testing --- server.js | 6 ++---- src/App.tsx | 3 +++ 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/server.js b/server.js index 4fa1801..1042e97 100644 --- a/server.js +++ b/server.js @@ -146,12 +146,10 @@ app.post('/login/callback', passport.authenticate('saml', { const options = { key: fs.readFileSync('./backend/facelect.capping.ecrl.marist.edu.key'), cert: fs.readFileSync('./backend/2024_facelect.capping.ecrl.marist.edu.crt'), - ca: [ - fs.readFileSync('./backend/2024_InCommonCA.crt') - ] + ca: fs.readFileSync('./backend/2024_InCommonCA.crt'), }; -// Create HTTPS server on port 3000 +// Create HTTPS server on port 3001 https.createServer(options, app).listen(3001, () => { console.log('HTTPS Server running on port 3001'); }); \ No newline at end of file diff --git a/src/App.tsx b/src/App.tsx index 17119a0..d09548c 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -14,6 +14,9 @@ function App() { {/* Default route for the login page */} } /> + {/* Route for the SSO login page */} + } /> + {/* Route for the admin login page */} } /> From ce7e845b9fb449abc839609f41c1c18b800a72a5 Mon Sep 17 00:00:00 2001 From: Brendon Kupsch <98063893+BrendonKupsch1@users.noreply.github.com> Date: Fri, 22 Nov 2024 02:12:20 -0500 Subject: [PATCH 012/163] SSO button functionality testing --- src/App.tsx | 3 --- src/Login.tsx | 7 ++++++- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/App.tsx b/src/App.tsx index d09548c..17119a0 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -14,9 +14,6 @@ function App() { {/* Default route for the login page */} } /> - {/* Route for the SSO login page */} - } /> - {/* Route for the admin login page */} } /> diff --git a/src/Login.tsx b/src/Login.tsx index 9d6ffea..a8e0259 100644 --- a/src/Login.tsx +++ b/src/Login.tsx @@ -6,7 +6,12 @@ import Footer from './components/footer/footer'; function Login() { const handleSSOLogin = () => { - window.location.href = '/login'; // Redirect to the SSO login route + // Create a form element to submit the request to the backend /login route + const form = document.createElement('form'); + form.method = 'GET'; + form.action = '/login'; + document.body.appendChild(form); + form.submit(); }; return ( From 954a0e791827a843997da3590ab73364909cbe75 Mon Sep 17 00:00:00 2001 From: Brendon Kupsch <98063893+BrendonKupsch1@users.noreply.github.com> Date: Fri, 22 Nov 2024 02:15:40 -0500 Subject: [PATCH 013/163] sso button testing --- server.js | 2 +- src/Login.tsx | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/server.js b/server.js index 1042e97..0590523 100644 --- a/server.js +++ b/server.js @@ -129,7 +129,7 @@ app.get('/faculty', async (req, res) => { }); // SSO login route -app.get('/login', passport.authenticate('saml', { +app.get('/sso/login', passport.authenticate('saml', { successRedirect: '/user-profile', failureRedirect: '/login' })); diff --git a/src/Login.tsx b/src/Login.tsx index a8e0259..9e87d85 100644 --- a/src/Login.tsx +++ b/src/Login.tsx @@ -6,10 +6,10 @@ import Footer from './components/footer/footer'; function Login() { const handleSSOLogin = () => { - // Create a form element to submit the request to the backend /login route + // Create a form element to submit the request to the backend /sso/login route const form = document.createElement('form'); form.method = 'GET'; - form.action = '/login'; + form.action = '/sso/login'; document.body.appendChild(form); form.submit(); }; From 29e5397b79d907ab3faddc55e7a2cad57b1fa4e3 Mon Sep 17 00:00:00 2001 From: Brendon Kupsch <98063893+BrendonKupsch1@users.noreply.github.com> Date: Fri, 22 Nov 2024 02:25:33 -0500 Subject: [PATCH 014/163] SSO button functionality test --- server.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server.js b/server.js index 0590523..41d80f5 100644 --- a/server.js +++ b/server.js @@ -55,7 +55,7 @@ const hashPassword = (password) => { passport.use(new SamlStrategy( { path: '/login/callback', - entryPoint: 'https://auth.it.marist.edu/idp/profile/SAML2/Redirect/SSO', + entryPoint: 'https://auth.it.marist.edu/idp/profile/SAML2/POST-SimpleSign/SSO', issuer: 'https://facelect.capping.ecrl.marist.edu', cert: fs.readFileSync('./backend/idp_metadata.xml', 'utf-8'), }, From e4c40e59a8d76c96a9e3449306f5d4359b45d57f Mon Sep 17 00:00:00 2001 From: Brendon Kupsch <98063893+BrendonKupsch1@users.noreply.github.com> Date: Fri, 22 Nov 2024 02:30:30 -0500 Subject: [PATCH 015/163] SSO button testing --- src/Login.tsx | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/Login.tsx b/src/Login.tsx index 9e87d85..88e273a 100644 --- a/src/Login.tsx +++ b/src/Login.tsx @@ -6,12 +6,7 @@ import Footer from './components/footer/footer'; function Login() { const handleSSOLogin = () => { - // Create a form element to submit the request to the backend /sso/login route - const form = document.createElement('form'); - form.method = 'GET'; - form.action = '/sso/login'; - document.body.appendChild(form); - form.submit(); + window.location.href = '/sso/login'; // Redirect to the SSO login route }; return ( From 7b64aa7ea3ca93ead0ca1889f568188c0eca0b3f Mon Sep 17 00:00:00 2001 From: Brendon Kupsch <98063893+BrendonKupsch1@users.noreply.github.com> Date: Fri, 22 Nov 2024 02:39:16 -0500 Subject: [PATCH 016/163] SSO button testing --- server.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server.js b/server.js index 41d80f5..0590523 100644 --- a/server.js +++ b/server.js @@ -55,7 +55,7 @@ const hashPassword = (password) => { passport.use(new SamlStrategy( { path: '/login/callback', - entryPoint: 'https://auth.it.marist.edu/idp/profile/SAML2/POST-SimpleSign/SSO', + entryPoint: 'https://auth.it.marist.edu/idp/profile/SAML2/Redirect/SSO', issuer: 'https://facelect.capping.ecrl.marist.edu', cert: fs.readFileSync('./backend/idp_metadata.xml', 'utf-8'), }, From a3c356da573223a8d52b8ecaec2d8e60587dc03c Mon Sep 17 00:00:00 2001 From: Brendon Kupsch <98063893+BrendonKupsch1@users.noreply.github.com> Date: Fri, 22 Nov 2024 02:43:48 -0500 Subject: [PATCH 017/163] SSO button testing --- src/AdminLogin.tsx | 2 +- src/AdminView.tsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/AdminLogin.tsx b/src/AdminLogin.tsx index 9b72a60..058c1c3 100644 --- a/src/AdminLogin.tsx +++ b/src/AdminLogin.tsx @@ -17,7 +17,7 @@ const AdminLogin: React.FC = () => { const handleSubmit = async (e: FormEvent) => { e.preventDefault(); try { - const response = await fetch('http://10.11.29.103:3001/admin-login', { + const response = await fetch('https://facelect.capping.ecrl.marist.edu', { method: 'POST', headers: { 'Content-Type': 'application/json', diff --git a/src/AdminView.tsx b/src/AdminView.tsx index e1ad3b4..e6d6d95 100644 --- a/src/AdminView.tsx +++ b/src/AdminView.tsx @@ -87,7 +87,7 @@ const App: React.FC = () => { useEffect(() => { - fetch('http://10.11.29.103:3001/faculty') + fetch('https://facelect.capping.ecrl.marist.edu/faculty') .then(response => response.json()) .then(data => setRowData(data)) .catch(error => console.error('Error fetching data:', error)); From 860b8456ab2fc7d608bbeb56df7e0664ec6580af Mon Sep 17 00:00:00 2001 From: Nicolas DiPardo <112446116+siezorsalad@users.noreply.github.com> Date: Thu, 31 Oct 2024 16:45:19 -0400 Subject: [PATCH 018/163] Update ci-cd.yml --- .github/workflows/ci-cd.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci-cd.yml b/.github/workflows/ci-cd.yml index ea4137f..188acb3 100644 --- a/.github/workflows/ci-cd.yml +++ b/.github/workflows/ci-cd.yml @@ -16,7 +16,7 @@ jobs: - name: Setup SSH uses: webfactory/ssh-agent@v0.5.3 with: - ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }} + ssh-private-key: ${{ secrets.717288384919whqjainwn18274 }} - name: Deploy to Server env: From 430db69ba7d0adb5d248a9fd86cc8826bd32555f Mon Sep 17 00:00:00 2001 From: Nicolas DiPardo <112446116+siezorsalad@users.noreply.github.com> Date: Thu, 31 Oct 2024 16:46:04 -0400 Subject: [PATCH 019/163] Update ci-cd.yml --- .github/workflows/ci-cd.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci-cd.yml b/.github/workflows/ci-cd.yml index 188acb3..529350e 100644 --- a/.github/workflows/ci-cd.yml +++ b/.github/workflows/ci-cd.yml @@ -16,7 +16,7 @@ jobs: - name: Setup SSH uses: webfactory/ssh-agent@v0.5.3 with: - ssh-private-key: ${{ secrets.717288384919whqjainwn18274 }} + ssh-private-key: 717288384919whqjainwn18274 - name: Deploy to Server env: From 2b31db439bceb1a71816270e33846349b1db6788 Mon Sep 17 00:00:00 2001 From: Nicolas DiPardo <112446116+siezorsalad@users.noreply.github.com> Date: Thu, 31 Oct 2024 16:56:22 -0400 Subject: [PATCH 020/163] Update ci-cd.yml --- .github/workflows/ci-cd.yml | 32 ++++++++++++++------------------ 1 file changed, 14 insertions(+), 18 deletions(-) diff --git a/.github/workflows/ci-cd.yml b/.github/workflows/ci-cd.yml index 529350e..c679a0b 100644 --- a/.github/workflows/ci-cd.yml +++ b/.github/workflows/ci-cd.yml @@ -13,26 +13,22 @@ jobs: - name: Checkout code uses: actions/checkout@v2 - - name: Setup SSH - uses: webfactory/ssh-agent@v0.5.3 - with: - ssh-private-key: 717288384919whqjainwn18274 - - name: Deploy to Server - env: - SERVER_IP: 10.11.29.103 - SERVER_USER: developer - run: | - ssh -o StrictHostKeyChecking=no $SERVER_USER@$SERVER_IP << 'EOF' - # Navigate to app directory or clone if not already present + uses: appleboy/ssh-action@v0.1.12 + with: + host: ${{ secrets.SERVER_IP }} + username: ${{ secrets.SERVER_USER }} + key: ${{ secrets.SSH_PRIVATE_KEY }} + script: | + # Navigate to the app directory or clone it if not present cd /path/to/your-app || git clone https://github.com/your-username/electionCapping24.git /path/to/your-app && cd /path/to/your-app - - # Pull latest changes + + # Pull the latest changes git pull origin main - - # Install dependencies (assuming a Node.js app; adjust as necessary) + + # Install dependencies (assuming Node.js; adjust as needed) npm install + + # Restart the app (using pm2, nohup, or similar) + pm2 restart app || pm2 start app.js --name app - # Restart the app (using pm2, or nohup to run in the background) - pm2 restart app || pm2 start app.js --name app # Replace 'app.js' with your entry file - EOF From 9ce30a22da68c12ab73ae975f6e906a5fbb5f0d0 Mon Sep 17 00:00:00 2001 From: Nicolas DiPardo <112446116+siezorsalad@users.noreply.github.com> Date: Thu, 31 Oct 2024 17:00:31 -0400 Subject: [PATCH 021/163] Update ci-cd.yml --- .github/workflows/ci-cd.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci-cd.yml b/.github/workflows/ci-cd.yml index c679a0b..da049df 100644 --- a/.github/workflows/ci-cd.yml +++ b/.github/workflows/ci-cd.yml @@ -14,11 +14,11 @@ jobs: uses: actions/checkout@v2 - name: Deploy to Server - uses: appleboy/ssh-action@v0.1.12 + uses: appleboy/ssh-action@v0.1.10 with: - host: ${{ secrets.SERVER_IP }} - username: ${{ secrets.SERVER_USER }} - key: ${{ secrets.SSH_PRIVATE_KEY }} + host: 10.11.29.103 + username: developer + key: 717288384919whqjainwn18274 script: | # Navigate to the app directory or clone it if not present cd /path/to/your-app || git clone https://github.com/your-username/electionCapping24.git /path/to/your-app && cd /path/to/your-app From 2481be2f7bfb70201bab5d4b31e8749690259f91 Mon Sep 17 00:00:00 2001 From: Nicolas DiPardo <112446116+siezorsalad@users.noreply.github.com> Date: Fri, 1 Nov 2024 15:13:13 -0400 Subject: [PATCH 022/163] Update ci-cd.yml --- .github/workflows/ci-cd.yml | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/.github/workflows/ci-cd.yml b/.github/workflows/ci-cd.yml index da049df..2845b1c 100644 --- a/.github/workflows/ci-cd.yml +++ b/.github/workflows/ci-cd.yml @@ -3,7 +3,7 @@ name: Deploy to Server via SSH on: push: branches: - - main # Trigger on pushes to the main branch + - main jobs: deploy: @@ -13,13 +13,14 @@ jobs: - name: Checkout code uses: actions/checkout@v2 + - name: Install sshpass + run: sudo apt-get install -y sshpass + - name: Deploy to Server - uses: appleboy/ssh-action@v0.1.10 - with: - host: 10.11.29.103 - username: developer - key: 717288384919whqjainwn18274 - script: | + env: + SSH_PASSWORD: MaristDev2024! + run: | + sshpass -p "$SSH_PASSWORD" ssh -o StrictHostKeyChecking=no ${{ secrets.SERVER_USER }}@${{ secrets.SERVER_IP }} << 'EOF' # Navigate to the app directory or clone it if not present cd /path/to/your-app || git clone https://github.com/your-username/electionCapping24.git /path/to/your-app && cd /path/to/your-app @@ -31,4 +32,4 @@ jobs: # Restart the app (using pm2, nohup, or similar) pm2 restart app || pm2 start app.js --name app - + EOF From 9d723f954888c419603293ddbcae32efdbe6822b Mon Sep 17 00:00:00 2001 From: Nicolas DiPardo <112446116+siezorsalad@users.noreply.github.com> Date: Fri, 1 Nov 2024 15:30:53 -0400 Subject: [PATCH 023/163] Update ci-cd.yml --- .github/workflows/ci-cd.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci-cd.yml b/.github/workflows/ci-cd.yml index 2845b1c..e0e8286 100644 --- a/.github/workflows/ci-cd.yml +++ b/.github/workflows/ci-cd.yml @@ -20,7 +20,7 @@ jobs: env: SSH_PASSWORD: MaristDev2024! run: | - sshpass -p "$SSH_PASSWORD" ssh -o StrictHostKeyChecking=no ${{ secrets.SERVER_USER }}@${{ secrets.SERVER_IP }} << 'EOF' + sshpass -p "$SSH_PASSWORD" ssh -vvv -o StrictHostKeyChecking=no ${{ secrets.SERVER_USER }}@${{ secrets.SERVER_IP }} << 'EOF' # Navigate to the app directory or clone it if not present cd /path/to/your-app || git clone https://github.com/your-username/electionCapping24.git /path/to/your-app && cd /path/to/your-app From f4a795f19cbd5762041edb06e18d3748dca4c300 Mon Sep 17 00:00:00 2001 From: Nicolas DiPardo <112446116+siezorsalad@users.noreply.github.com> Date: Fri, 1 Nov 2024 15:37:38 -0400 Subject: [PATCH 024/163] Update ci-cd.yml --- .github/workflows/ci-cd.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci-cd.yml b/.github/workflows/ci-cd.yml index e0e8286..4963e16 100644 --- a/.github/workflows/ci-cd.yml +++ b/.github/workflows/ci-cd.yml @@ -18,9 +18,11 @@ jobs: - name: Deploy to Server env: + SSH_IP: 10.11.29.103 + SSH_USER: root SSH_PASSWORD: MaristDev2024! run: | - sshpass -p "$SSH_PASSWORD" ssh -vvv -o StrictHostKeyChecking=no ${{ secrets.SERVER_USER }}@${{ secrets.SERVER_IP }} << 'EOF' + sshpass -p "$SSH_PASSWORD" ssh -o StrictHostKeyChecking=no $SSH_USER@$SSH_IP << 'EOF' # Navigate to the app directory or clone it if not present cd /path/to/your-app || git clone https://github.com/your-username/electionCapping24.git /path/to/your-app && cd /path/to/your-app From b78db760821c3c6fdfe3300100454b76468cdf72 Mon Sep 17 00:00:00 2001 From: Nicolas DiPardo <112446116+siezorsalad@users.noreply.github.com> Date: Sat, 9 Nov 2024 14:45:49 -0500 Subject: [PATCH 025/163] Update ci-cd.yml --- .github/workflows/ci-cd.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci-cd.yml b/.github/workflows/ci-cd.yml index 4963e16..846b594 100644 --- a/.github/workflows/ci-cd.yml +++ b/.github/workflows/ci-cd.yml @@ -22,7 +22,7 @@ jobs: SSH_USER: root SSH_PASSWORD: MaristDev2024! run: | - sshpass -p "$SSH_PASSWORD" ssh -o StrictHostKeyChecking=no $SSH_USER@$SSH_IP << 'EOF' + sshpass -p "$SSH_PASSWORD" ssh -vvv -o StrictHostKeyChecking=no $SSH_USER@$SSH_IP << 'EOF' # Navigate to the app directory or clone it if not present cd /path/to/your-app || git clone https://github.com/your-username/electionCapping24.git /path/to/your-app && cd /path/to/your-app From cf941442f264df1483485ad7c5580599850560b9 Mon Sep 17 00:00:00 2001 From: Nicolas DiPardo <112446116+siezorsalad@users.noreply.github.com> Date: Sat, 9 Nov 2024 14:56:08 -0500 Subject: [PATCH 026/163] Update ci-cd.yml seeing if github actions can ping the server --- .github/workflows/ci-cd.yml | 23 +++++++---------------- 1 file changed, 7 insertions(+), 16 deletions(-) diff --git a/.github/workflows/ci-cd.yml b/.github/workflows/ci-cd.yml index 846b594..cd86268 100644 --- a/.github/workflows/ci-cd.yml +++ b/.github/workflows/ci-cd.yml @@ -16,22 +16,13 @@ jobs: - name: Install sshpass run: sudo apt-get install -y sshpass - - name: Deploy to Server + - name: Test Server Reachability + run: ping -c 4 ${{ secrets.SERVER_IP }} + + - name: Debug SSH Connection env: - SSH_IP: 10.11.29.103 - SSH_USER: root - SSH_PASSWORD: MaristDev2024! + SSH_PASSWORD: ${{ secrets.SSH_PASSWORD }} run: | - sshpass -p "$SSH_PASSWORD" ssh -vvv -o StrictHostKeyChecking=no $SSH_USER@$SSH_IP << 'EOF' - # Navigate to the app directory or clone it if not present - cd /path/to/your-app || git clone https://github.com/your-username/electionCapping24.git /path/to/your-app && cd /path/to/your-app - - # Pull the latest changes - git pull origin main - - # Install dependencies (assuming Node.js; adjust as needed) - npm install - - # Restart the app (using pm2, nohup, or similar) - pm2 restart app || pm2 start app.js --name app + sshpass -p "$SSH_PASSWORD" ssh -vvv -o StrictHostKeyChecking=no root@${{ secrets.SERVER_IP }} << 'EOF' + echo "Connected successfully" EOF From 241a226fa5b5ba92cc764e0ec61bf0dc6374d5a5 Mon Sep 17 00:00:00 2001 From: Nicolas DiPardo <112446116+siezorsalad@users.noreply.github.com> Date: Sat, 9 Nov 2024 15:00:41 -0500 Subject: [PATCH 027/163] Update ci-cd.yml --- .github/workflows/ci-cd.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci-cd.yml b/.github/workflows/ci-cd.yml index cd86268..84d1d35 100644 --- a/.github/workflows/ci-cd.yml +++ b/.github/workflows/ci-cd.yml @@ -17,7 +17,7 @@ jobs: run: sudo apt-get install -y sshpass - name: Test Server Reachability - run: ping -c 4 ${{ secrets.SERVER_IP }} + run: ping -c 4 10.11.29.103 - name: Debug SSH Connection env: From cf9f61b8d51426dfa2ca954d25e4a59cd40fe9ca Mon Sep 17 00:00:00 2001 From: AaronBonilla Date: Sat, 9 Nov 2024 19:03:55 -0500 Subject: [PATCH 028/163] 50 faculty, no website --- db/sql/Test_Data_Revised_1.sql | 229 ++++++++++++++++++++++++++++++++- 1 file changed, 227 insertions(+), 2 deletions(-) diff --git a/db/sql/Test_Data_Revised_1.sql b/db/sql/Test_Data_Revised_1.sql index f495214..3be621f 100644 --- a/db/sql/Test_Data_Revised_1.sql +++ b/db/sql/Test_Data_Revised_1.sql @@ -14,7 +14,52 @@ INSERT INTO People (Fname, Lname) VALUES ( 'Joseph', 'Kirtland'), ( 'Bowu', 'Zhang'), ( 'Casimer', 'DeCusatis'), - ( 'Eitel', 'Lauria'); + ( 'Eitel', 'Lauria'), + ('Luis', 'Espinasa'), + ('Tracey', 'McGrail'), + ('Megan', 'Dennis'), + ('Jocelyn', 'Nadeau'), + ('Andrei', 'Buckareff'), + ('Joshua', 'Kotzin'), + ('Annamaria', 'Maciocia'), + ('Brian', 'Loh'), + ('Melissa', 'Gaeke'), + ('Jennifer', 'Finn'), + ('Jeff', 'Bass'), + ('Joseph', 'Campisi'), + ('Elizabeth', 'Reid'), + ('Sally', 'Dwyer-McNulty'), + ('John Morrison', 'Galbraith'), + ('Henry', 'Pratt'), + ('Patricia', 'Ferrer-Medina'), + ('Lynn M.', 'Eckert'), + ('Joanna', 'D''Avanzo'), + ('Kristin', 'Bayer'), + ('Jessica', 'Boscarino'), + ('Georganna', 'Ulary'), + ('Matt', 'Andrews'), + ('Anne', 'Bertrand-Dewsnap'), + ('Qihao', 'Ji'), + ('M. Marina', 'Melita'), + ('Sasha', 'Biro'), + ('Rebecca', 'Brown'), + ('Robyn L.', 'Rosen'), + ('Eileen', 'Curley'), + ('Lisa R.', 'Neilson'), + ('Tommy', 'Zurhellen'), + ('Lea', 'Graham'), + ('Jamie', 'Perillo'), + ('Stephanie', 'Conover'), + ('Daria', 'Hanssen'), + ('Kavous', 'Ardalan'), + ('Julie', 'Raines'), + ('Jennifer', 'Robinette'), + ('Jason', 'Trent'), + ('Thomas M.', 'Madden'), + ('Kuangnen', 'Cheng'), + ('Byunghoon', 'Jin'), + ('Ryan', 'Kinlaw'), + ('Yuwei', 'Wang'); -- Inserting all the committees INSERT INTO Committees (Cname) VALUES @@ -85,7 +130,187 @@ INSERT INTO Faculty (FID, Email, SchoolID, IsHidden, PrefName, URL, TheStatement (5, 'Eitel.Lauria@marist.edu', 5, false, 'Eitel Lauria', 'http://example.com/eitel_lauria', 'I have chaired the AAC and served as the Vice Chair of FAC during the pandemic. I currently chair the faculty search committee in my department. I served on the presidential search committee, the CIO''s search committee, the previous middle-states committee, and co-chaired one of the strategic plan working groups. I have helped hire and mentored most of the faculty in my department through tenure and promotion. I will be on sabbatical in Spring 2025.', - '2024-03-19 17:12:37'); + '2024-03-19 17:12:37'), + + (6, 'Luis.Espinasa@marist.edu', 6, false, 'Luis Espinasa', 'http://www.marist.edu/{school}/faculty/{fn-ln}', + 'I have been in Marist for 18 years. Have served in the Rank and Tenure committee once, and in the Grievance Committee as its Chair for two years.', + '2024-03-19 18:44:57'), + + (7, 'Tracey.McGrail@marist.edu', 2, false, 'Tracey McGrail', 'http://www.marist.edu/{school}/faculty/{fn-ln}', + 'I believe that faculty service is very important to the function of the college. In particular, while membership on the Rank and Tenure Committee is a heavy commitment (I was on when there were 13 candidates for tenure!), this group plays a critical role in evaluating faculty. If elected I will serve.', + '2024-03-21 15:12:53'), + + (8, 'Megan.Dennis@marist.edu', 6, false, 'Megan Dennis', 'http://www.marist.edu/{school}/faculty/{fn-ln}', + 'I am not comfortable serving on Rank & Tenure at this point in my career. As a recently-tenured faculty member, I have not yet had the opportunity to serve on a peer committee for tenure evaluation, and feel that I lack the experience necessary to fairly assess candidates from across the college as a member of R&T.', + '2024-03-27 13:22:33'), + + (9, 'Jocelyn.Nadeau@marist.edu', 6, false, 'Jocelyn Nadeau', 'http://www.marist.edu/{school}/faculty/{fn-ln}', + 'Since I started in 2005, I have served on many campus wide, SoS, and departmental committees and spent considerable time devoted to service that is unique to laboratory science within my department. These service endeavors have all been rewarding and productive in their own way, but they have also negatively impacted my ability to advance my scholarship to where it needs to be to apply for promotion to full professor, especially in the past 5 years due to COVID-related and overall workload issues. So, I am asking for some consideration given that I have already served on two of the major elected committees since 2012. As soon as I was tenured and eligible after my probationary year, I was elected to the Rank and Tenure Committee in 2012 and served as its chair during the third year of my term (in only my 10th year at Marist). Right after my service sabbatical was over, I was elected to FAC where I served a 3-year term that spanned through summer 2020. I will be more than willing to serve on R&T again in the future, but I am asking for some mercy at this current time. Thank you.', + '2024-03-29 14:33:05'), + + (10, 'Andrei.Buckareff@marist.edu', 3, false, 'Andrei Buckareff', 'http://www.marist.edu/{school}/faculty/{fn-ln}', + 'I have enjoyed serving on Rank & Tenure, along with other committees. While it''s a lot of work, it is rewarding work. I am presently in my first year serving on the Faculty Research and Sabbaticals (which I have served on previously). I am presently chair of said committee. I am happy to serve on any committee.', + '2024-03-29 17:23:01'), + + (11, 'Joshua.Kotzin@marist.edu', 3, false, 'Joshua Kotzin', 'http://www.marist.edu/{school}/faculty/{fn-ln}', + 'I believe service is an important way for faculty to help the college fulfill its mission. As the Chair of the English Department (in which role I''ve served for more than a year), I have learned a lot about the institution as a whole and the ways faculty work fits into that bigger picture.', + '2024-03-29 18:36:28'), + + (12, 'Annamaria.Maciocia@marist.edu', 3, false, 'Annamaria Maciocia', 'http://www.marist.edu/{school}/faculty/{fn-ln}', + 'I am honored to serve the faculty, School of Liberal Arts, and the Marist community in any capacity. If elected, I will contribute my time and best effort to participate on FAC or AAC. As a term faculty member at Marist College since 1995, I have witnessed the diligent, selfless dedication of tenured faculty in these roles. It is with profound gratitude and respect for their service that I am motivated to serve. Additionally both FAC and AAC are vital to the integrity of shared governance; therefore, service at this responsibility of every eligible faculty member.', + '2024-03-29 23:45:04'), + + (13, 'Brian.Loh@marist.edu', 3, false, 'Brian Loh', 'http://www.marist.edu/{school}/faculty/{fn-ln}', + 'I am currently serving as acting honors director, and I''m a member of the Marist Mindfulness Collective, the Global Studies Committee, and the Interfaith Committee. As of writing (3/30/24) I am not seeking election as I have a kid coming end of May and will be on parental leave in spring ''25. I am open to serving in the future, but please consider someone who will be a little less distracted this time around!', + '2024-03-30 07:30:45'), + + (14, 'Melissa.Gaeke@marist.edu', 3, false, 'Melissa Gaeke', 'http://www.marist.edu/{school}/faculty/{fn-ln}', + 'I believe that service to a community is a vital component to a healthy system of governance and think that committees should reflect diverse and representative voices of the various constituencies that comprise the community. While full representation is not always possible, it is the responsibility of those who serve to make sure they are involved with those they represent so they are able to adequately represent their interests.', + '2024-03-30 09:34:53'), + + (15, 'Jennifer.Finn@marist.edu', 1, false, 'Jennifer Finn', 'http://www.marist.edu/{school}/faculty/{fn-ln}', + 'For the last 5 years, I''ve served as Department Chair for the Fashion Design and Merchandising Program, where I''ve collaborated with faculty on several curriculum and assessment initiatives, served in an advisory role with faculty and administration members, and positioned myself as a leader & mentor to our part-time faculty members. I''m interested in serving as a member on the Faculty Affairs Committee because I believe the role of faculty shared governance is an extremely important one, and there are opportunities that exist for further defining roles, responsibilities, and development for Term faculty.', + '2024-03-30 10:35:16'), + + (16, 'Jeff.Bass@marist.edu', 1, false, 'Jeff Bass', 'http://www.marist.edu/{school}/faculty/{fn-ln}', + 'Hello colleagues, besides being eligible, I am ready, willing, and able to serve on the Faculty Affairs Committee. I am one of the longest-serving term faculty, and in 2018-19 I chaired a committee that was instrumental in making term faculty eligible for FAC and AAC. In the past year, I have gone through a series of disciplinary measures designed to make me a better employee, teacher, and human being. I feel more capable than ever to represent your interests on the FAC, and I am eager to work with the new group of dynamic administrators managing the faculty and the college. I hope I can count on your vote, I won''t let you down.', + '2024-03-30 17:36:56'), + + (17, 'Joseph.Campisi@marist.edu', 3, false, 'Joseph Campisi', 'http://www.marist.edu/{school}/faculty/{fn-ln}', + 'I have served on a number of committees during my time here at Marist and am currently the co-chair of CSAC and on the Fellowship Committee (which works with Pat Taylor and students applying for things like Fulbrights, etc.). I view service to students, the college, and my faculty colleagues as important, and would gladly serve on any committee if so elected.', + '2024-03-31 11:42:26'), + + (18, 'Elizabeth.Reid@marist.edu', 2, false, 'Elizabeth Reid', 'http://www.marist.edu/{school}/faculty/{fn-ln}', + 'I enjoy working closely with students and faculty in clubs and committees. While serving on committees, I have formed professional relationships and collaborated with people across campus. Some committees I have been a member of include: the Campus Life Committee, the Celebration of Undergraduate Research, Scholarship & Creative Activity (CURSCA) Committee, and a committee charged with planning academic events around the inauguration of President Weinman. During the Middle States review, I served as a member of the Working Group on Standard VII: Governance, Leadership, and Administration for the reaccreditation of Marist College. I am also currently a Hearing Board Member. This year I have taken on the added responsibility of being a Co-Chair of the CURSCA committee. In this position, I work closely with faculty and staff to organize an event that provides a platform for students to showcase their work to the Marist community. Although I will be on sabbatical next Spring, I am looking forward to additional service opportunities in the future.', + '2024-03-31 21:26:07'), + + (19, 'Sally.Dwyer-McNulty@marist.edu', 3, false, 'Sally Dwyer-McNulty', 'http://www.marist.edu/{school}/faculty/{fn-ln}', + 'I value shared governance and working with faculty, students, staff, and administrators across campus.', + '2024-04-01 10:00:28'), + + (20, 'John.Morrison.Galbraith@marist.edu', 6, false, 'John Morrison Galbraith', 'http://www.marist.edu/{school}/faculty/{fn-ln}', + 'I do not have a strong desire to be on committees. I do not think I am particularly good at it, and I feel my time and effort is better spent with teaching and research. However, I do believe in making Marist a better place, and I recognize the importance and value of faculty committees. Therefore, I have always served and will continue to serve, to the best of my ability on whatever committee I am on.', + '2024-04-01 10:00:28'), + + (21, 'henry.pratt@marist.edu', 3, false, 'Henry Pratt', 'http://www.marist.edu/school-of-science/faculty/henry-pratt', + 'I would be willing to serve on an elected committee in the future, but in AY2024-25, I will be taking on Department Chair duty for the first time, as well as shepherding my department through our long-awaited program review. I would prefer not to have to do this and be on FAC initially.', + '2024-04-01 13:30:41'), + + (22, 'patricia.ferrer-medina@marist.edu', 2, false, 'Patricia Ferrer-Medina', 'http://www.marist.edu/arts/faculty/patricia-ferrer-medina', + 'I am currently chair of my department as well as Director of Latin American and Caribbean Studies and Coordinator of Spanish Internships. Service is important and significant to me when I feel I am able to take on the responsibility and do it well.', + '2024-04-02 21:56:14'), + + (23, 'lynn.eckert@marist.edu', 3, false, 'Lynn M. Eckert', 'http://www.marist.edu/school-of-science/faculty/lynn-eckert', + 'I see service as an important duty as a faculty member, and if elected, I will serve. In the past, I have served on AAC, FAC, and the Grievance Committee. In my view, under new leadership, the College has a historic opportunity to address structural and cultural issues that have impeded growth. Among those issues are concerns about workload, pay equity, and limited faculty resources for research and high-impact learning practices. At the same time, having served on these faculty-wide committees, I also believe that the College benefits when we hear from a wide variety of voices.', + '2024-04-02 21:57:44'), + + (24, 'joanna.davanzo@marist.edu', 1, false, 'Joanna D''Avanzo', 'http://www.marist.edu/arts/faculty/joanna-davanzo', + 'Throughout my life, I''ve been guided by a simple belief: that lending a hand to others can truly make a difference. I grew up in a tight-knit community alongside my dad''s beloved neighborhood pharmacy. To me, it wasn''t just a business or where people came for medication; it was a place where people came for care and compassion. My dad was the driving force behind it all, always ready to step up and help out. Whether it was providing vital medication to AIDS patients when others turned them away or ensuring that UCP patients received their daily deliveries, he showed me what it means to make a difference. Working with him from a young age, I got to see firsthand how a little kindness can go a long way. It''s amazing how something as simple as a helping hand can bring a whole community together. Inspired by his example, I''ve continually sought to contribute to a greater cause. Whether mentoring through the Big Brother/Big Sister program, imparting knowledge to high school students through weekly advertising courses, or lending leadership to PTAs and junior and high school football organizations, I''ve always sought ways to make a difference. And I''ve learned that it''s not just about the impact on others—I''ve found personal growth and fulfillment in every service opportunity whether in my local community or at Marist. By breaking out of school/department silos and getting involved in college-wide committees, these endeavors not only afford me the chance to learn and grow but also enable me to connect with fellow members of the Marist community and form meaningful relationships with colleagues across diverse backgrounds and disciplines.', + '2024-04-02 22:53:33'), + + (25, 'kristin.bayer@marist.edu', 3, false, 'Kristin Bayer', 'http://www.marist.edu/school-of-science/faculty/kristin-bayer', + 'I am currently in the second term as chair of the History department, overseeing our 5-year review. I am also the director of the Women''s, Gender, and Sexuality Studies program. I would prefer to serve on this committee after my 6 years of being chair is over.', + '2024-04-03 08:45:29'), + + (26, 'jessica.boscarino@marist.edu', 3, false, 'Jessica Boscarino', 'http://www.marist.edu/school-of-science/faculty/jessica-boscarino', + 'As a current department Chair with a lot of recent service responsibilities, I respectfully request that people refrain from voting for me. Since I took over as Chair during COVID, and through my experience on the steering committee for the Strategic Plan, I have devoted a lot of time to service in the past few years. I am trying to achieve a better balance with my research agenda that has suffered as a result of this service. I prefer to serve at a time when I can devote my full energies to the task.', + '2024-04-03 08:55:54'), + + (27, 'georganna.ulary@marist.edu', 3, false, 'Georganna Ulary', 'http://www.marist.edu/school-of-science/faculty/georganna-ulary', + 'I am currently serving on the PRC which has been a very interesting and rewarding experience. I still have 2 more years on this committee. Because the PRC committee meets every week, I''d prefer not to serve on another large campus-wide committee until after I''m finished serving on the PRC.', + '2024-04-03 10:44:25'), + + (28, 'matt.andrews@marist.edu', 3, false, 'Matt Andrews', 'http://www.marist.edu/school-of-science/faculty/matt-andrews', + 'In my 24 years I have served on a variety of committees but not on FAC and I welcome that opportunity. I am also interested in serving on Grievance again, as it''s been several years.', + '2024-04-03 10:54:17'), + + (29, 'anne.bertrand-dewsnap@marist.edu', 1, false, 'Anne Bertrand-Dewsnap', 'http://www.marist.edu/arts/faculty/anne-bertrand-dewsnap', + 'I started working at Marist as an adjunct over 20 years ago and I am now a Senior Lecturer in the Department of Art and Digital Media. I will be Chair of my department next year. So, you might consider giving me a year to acclimate to my new position...', + '2024-04-03 15:04:39'), + + (30, 'qihao.ji@marist.edu', 1, false, 'Qihao Ji', 'http://www.marist.edu/arts/faculty/qihao-ji', + 'I study the role of self-transcendent emotions in human communication and wish to highlight my value in this line of research, as opposed to serving in FAC. I would advocate for thoughtful consideration of other candidates whose dedication to this role is matched by their enthusiasm and capability for it.', + '2024-04-03 15:05:33'), + + (31, 'Marina.Melita@marist.edu', 3, FALSE, 'M. Marina Melita', 'http://www.marist.edu/school/faculty/marina-melita', + 'While I am usually happy to serve Marist in any way that I can, I do not think I can do so at this time, and also do a good job. Right now, I teach 8 courses per year, serve on the Global Studies Advising Committee, as well as the Queer Trans Sub-Committee of the Diversity Council. I run the Italian program at Marist and serve as the Chair of the World Film Program. Beyond Marist, I have a book project in the works, and was recently elected as the President of the academic association for Italian studies; The American Association of Teachers of Italian. I fear that adding one more responsibility will hinder my ability to perform my current duties at the level that my students, colleagues, and community members deserve and expect from me. In the future, when I have wrapped up some of my current duties, I would be happy to serve on one of the standing committees for Marist.', + '2024-04-04 18:30:08'), + + (32, 'Sasha.Biro@marist.edu', 3, FALSE, 'Sasha Biro', 'http://www.marist.edu/school/faculty/sasha-biro', + 'I am a Lecturer of Philosophy and Coordinator of the Diversity, Equity, Inclusion Workshop in First Year Seminar. I currently serve on the Retention Committee, and the Interfaith Committee. I am also a faculty advisor/editor to the Marist Undergraduate Philosophy Journal.', + '2024-04-05 12:10:28'), + + (33, 'Rebecca.Brown@marist.edu', 1, FALSE, 'Rebecca Brown', 'http://www.marist.edu/school/faculty/rebecca-brown', + 'As a senior professional lecturer of Fashion Merchandising and the Faculty Advisor of MPorium at Marist (student run live retail laboratory located in Steel Plant) I collaborate often with other schools and departments across campus on special projects. I work closely with advancement on giving campaigns, worked with middle states committee, the Dean of SCA and SOM bringing product ideas to life from concept to execution. I am on the Marist Bookstore committee, along with many fashion program and school committees. I believe in the importance of service and collaborating with others to be a part of the solution and not the problem.', + '2024-04-06 08:53:37'), + + (34, 'Robyn.Rosen@marist.edu', 1, FALSE, 'Robyn L. Rosen', 'http://www.marist.edu/school/faculty/robyn-rosen', + 'As a senior professional lecturer of Fashion Merchandising and the Faculty Advisor of MPorium at Marist (student run live retail laboratory located in Steel Plant) I collaborate often with other schools and departments across campus on special projects. I work closely with advancement on giving campaigns, worked with middle states committee, the Dean of SCA and SOM bringing product ideas to life from concept to execution. I am on the Marist Bookstore committee, along with many fashion program and school committees. I believe in the importance of service and collaborating with others to be a part of the solution and not the problem.', + '2024-04-06 19:58:22'), + + (35, 'Eileen.Curley@marist.edu', 3, FALSE, 'Eileen Curley', 'http://www.marist.edu/school/faculty/eileen-curley', + 'While I would be happy to serve on campus-wide committees in the future as I have done in the past, I have just been appointed as the Academic Theatre Program Director and would like to be able to focus on the needs of the program, including restructuring some theatre processes & policies and mentoring a new hire in the program. I fully expect to continue to contribute to campus through numerous ongoing committees, but I would appreciate being passed over for this round of the major committees. And if you’d still like to vote for me, then thanks for the vote of confidence — I have been chair of English so I know that work intimately and work well (and happily) on logistics and editing. I am ultimately a theatre historian & designer at heart — I much prefer working & collaborating behind the scenes, digging into archives, and challenging audiences through art.', + '2024-04-06 21:42:02'), + + (36, 'Lisa.Neilson@marist.edu', 3, FALSE, 'Lisa R. Neilson', 'http://www.marist.edu/school/faculty/lisa-neilson', + 'I believe that faculty service is very important to the function of the college. It strengthens our institution initiatives and can help foster a healthy and vibrant community. I have recently transitioned into a Lecturer position in the English Department. I am also the new Internship Director in our department with plans to extensively grow the internship program for English majors and minors. I look forward to settling into these positions in the upcoming academic year. Additionally, I am the Director of the Summer Pre-College Creative Writing Program.', + '2024-04-07 11:07:19'), + + (37, 'Thomas.Zurhellen@marist.edu', 3, FALSE, 'Tommy Zurhellen', 'http://www.marist.edu/school/faculty/tommy-zurhellen', + 'Nobody does it better!', + '2024-04-07 13:51:52'), + + (38, 'Lea.Graham@marist.edu', 3, FALSE, 'Lea Graham', 'http://www.marist.edu/school/faculty/lea-graham', + 'I do not wish to serve on campus-wide committees at this time. I am in the middle of several book projects and am busy supporting the new hires in the English Department and other department/school annual events. Thank you.', + '2024-04-08 10:03:36'), + + (39, 'Jamie.Perillo@marist.edu', 1, FALSE, 'Jamie Perillo', 'http://www.marist.edu/school/faculty/jamie-perillo', + 'This is my 15th year at Marist. I welcome the opportunity to serve on the FAC and represent the Fashion Program, School of Communication, and the Arts and all faculty. I have served on the following committees: the Fashion Design Curriculum Committee, the SCA Inventory Committee, the Fashion Gallery & Archive Committee, and the Fashion Department Diversity and Inclusion Committee. I have also served on and chaired several search and peer review committees.', + '2024-04-09 16:23:57'), + + (40, 'Stephanie.Conover@marist.edu', 1, FALSE, 'Stephanie Conover', 'http://www.marist.edu/school/faculty/stephanie-conover', + 'I would be happy to serve on FAC. After six years at Marist, I am interested in more opportunities to serve the broader college community beyond the Fashion Program and SCA. I enjoy collaborating with others across disciplines and think that the faculty governance committees are essential is moving Marist forward as we approach our 100th year.', + '2024-04-09 17:51:15'), + + (41, 'daria.hanssen@marist.edu', 7, FALSE, 'Daria Hanssen', 'http://www.marist.edu/school/faculty/daria-hanssen', + 'I have been at Marist since 1996, starting as a part-time faculty in the Social Work/Sociology Department. As a tenured faculty member, I am committed to service and supporting the growth and development of students, in all ways.', + '2024-04-09 17:51:15'), + + (42, 'kavous.ardalan@marist.edu', 4, FALSE, 'Kavous Ardalan', 'http://www.marist.edu/school/faculty/kavous-ardalan', + 'My experience at Marist College has been on the academic side, in the sense that I have felt most comfortable and most productive when I was a member of the rank and tenure committee. At the School of Management, I have felt most comfortable and most productive when I was a member of the peer review committee, a member of faculty search committee, or the departmental chairperson.', + '2024-04-09 23:54:59'), + + (43, 'julie.raines@marist.edu', 7, FALSE, 'Julie Raines', 'http://www.marist.edu/school/faculty/julie-raines', + 'I would like to bring potential changes to the grievance process to a faculty plenary and working with current members will be the best way to develop improvements to our system. I started working on this while Chair of FAC with Beth Quinn so we have a good understanding of the areas of concern. Voting for me will give us the opportunity to make meaningful change to this process.', + '2024-04-10 09:34:17'), + + (44, 'jennifer.robinette@marist.edu', 6, FALSE, 'Jennifer Robinette', 'http://www.marist.edu/school/faculty/jennifer-robinette', + 'I have been Public Speaking Across the Curriculum Coordinator on campus since 2015. I created and coordinate the Power Presenting Workshops for our First-Year Seminars. I teach COM 101-Public Presentation online during the Summer and COM 420-Advanced Public Presentation in the Fall. I am the faculty advisor for North Road Communications (NRC) - our student-run PR firm, which has grown to include 130 students and 25 Teams serving community clients. I handle the NRC one-credit experiential learning course and teach PR classes including COM 418-Campaign Management, COM 371-PR Cases, COM 333-Applied Research & Analytics, and COM 319-Crisis Communication. I also teach COM 211-Intro. to PR online during the Summer and Winter. Every semester, I teach an overload of courses out of necessity.', + '2024-04-10 12:20:05'), + + (45, 'jason.trent@marist.edu', 7, FALSE, 'Jason Trent', 'http://www.marist.edu/school/faculty/jason-trent', + 'I just finished serving as the Secretary of the Faculty last semester (and I was on family leave for a portion of this current semester). I am open to serving on this committee.', + '2024-04-10 12:54:22'), + + (46, 'thomas.madden@marist.edu', 4, FALSE, 'Thomas M. Madden', 'http://www.marist.edu/school/faculty/thomas-madden', + 'Not thrilled to serve on grievance as I already serve as a hearing officer in Title IX, Academic Integrity, and Student Conduct panels....but will if elected.', + '2024-04-10 18:27:04'), + + (47, 'kuangnen.cheng@marist.edu', 4, FALSE, 'Kuangnen Cheng', 'http://www.marist.edu/school/faculty/kuangnen-cheng', + 'I have discovered that when a committee''s tasks and responsibilities do not align with my interests, my contribution tends to be minimal. My engagement is significantly higher in committees that develop recommendations to directly impact on student learning and life at Marist.', + '2024-04-11 08:59:00'), + + (48, 'byunghoon.jin@marist.edu', 4, FALSE, 'Byunghoon Jin', 'http://www.marist.edu/school/faculty/byunghoon-jin', + 'I will be on sabbatical this fall (2024).', + '2024-04-11 08:59:00'), + + (49, 'ryan.kinlaw@marist.edu', 7, FALSE, 'Ryan Kinlaw', 'http://www.marist.edu/school/faculty/ryan-kinlaw', + 'Having last year completed 6.5 years as department chair, I am currently willing to serve if elected to any committee. I feel this is an important element of the faculty role.', + '2024-04-11 17:21:39'), + + (50, 'yuwei.wang@marist.edu', 4, FALSE, 'Yuwei Wang', 'http://www.marist.edu/school/faculty/yuwei-wang', + 'I will be happy to serve on any committee if elected.', + '2024-04-23 13:01:23'); INSERT INTO Admins (aid, uname, thepassword, godmode) VALUES (1, 'admin1', 'cd6357efdd966de8c0cb2f876cc89ec74ce35f0968e11743987084bd42fb8944', TRUE) From b4144042cdd0e661001f6ca39c2f4b2b7b4bd4b1 Mon Sep 17 00:00:00 2001 From: Brendon Kupsch <98063893+BrendonKupsch1@users.noreply.github.com> Date: Fri, 22 Nov 2024 02:49:03 -0500 Subject: [PATCH 029/163] sso button testing --- server.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/server.js b/server.js index 0590523..eac413a 100644 --- a/server.js +++ b/server.js @@ -13,7 +13,8 @@ const app = express(); // List of allowed origins const allowedOrigins = [ - 'https://facelect.capping.ecrl.marist.edu' + 'https://facelect.capping.ecrl.marist.edu', + 'wss://facelect.capping.ecrl.marist.edu' ]; // Configure CORS to allow requests from your React app From a780d213a3c36ece5933ed68dd865289be2f2841 Mon Sep 17 00:00:00 2001 From: Brendon Kupsch <98063893+BrendonKupsch1@users.noreply.github.com> Date: Fri, 22 Nov 2024 02:59:45 -0500 Subject: [PATCH 030/163] SSO button testing --- server.js | 1 - src/App.tsx | 11 +++++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/server.js b/server.js index eac413a..03a111b 100644 --- a/server.js +++ b/server.js @@ -14,7 +14,6 @@ const app = express(); // List of allowed origins const allowedOrigins = [ 'https://facelect.capping.ecrl.marist.edu', - 'wss://facelect.capping.ecrl.marist.edu' ]; // Configure CORS to allow requests from your React app diff --git a/src/App.tsx b/src/App.tsx index 17119a0..22c92c5 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -22,6 +22,9 @@ function App() { {/* Route for the user profile page */} } /> + + {/* Route for the SSO redirect */} + } /> @@ -41,4 +44,12 @@ const ProtectedAdminRoute = () => { ); }; +function SSORedirect() { + React.useEffect(() => { + window.location.href = '/sso/login'; // Redirect to the server-side SSO login route + }, []); + + return
Redirecting...
; +} + export default App; From 24bd69b351fa5e1a020f166709ea466af60486dd Mon Sep 17 00:00:00 2001 From: Brendon Kupsch <98063893+BrendonKupsch1@users.noreply.github.com> Date: Fri, 22 Nov 2024 03:04:52 -0500 Subject: [PATCH 031/163] SSO button testing --- src/App.tsx | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/App.tsx b/src/App.tsx index 22c92c5..1b648d5 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -44,12 +44,11 @@ const ProtectedAdminRoute = () => { ); }; -function SSORedirect() { +const SSORedirect: React.FC = () => { React.useEffect(() => { window.location.href = '/sso/login'; // Redirect to the server-side SSO login route }, []); return
Redirecting...
; -} - +}; export default App; From a8a5bc45b91aa77ba1297f2a6acabed69a136f00 Mon Sep 17 00:00:00 2001 From: Brendon Kupsch <98063893+BrendonKupsch1@users.noreply.github.com> Date: Fri, 22 Nov 2024 14:34:02 -0500 Subject: [PATCH 032/163] implemented login.tsx from ethan-dev --- src/Login.tsx | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/src/Login.tsx b/src/Login.tsx index 88e273a..3090bb8 100644 --- a/src/Login.tsx +++ b/src/Login.tsx @@ -1,14 +1,16 @@ import React from 'react'; import './Login.css'; import backgroundImage from './assets/background.jpg'; -import logoImage from './assets/logo.png'; +import logoImage from './assets/logo.png' import Footer from './components/footer/footer'; -function Login() { - const handleSSOLogin = () => { - window.location.href = '/sso/login'; // Redirect to the SSO login route - }; +function handleSSOLogin() { + console.log('going to the /login') + window.location.href = 'https://facelect.capping.ecrl.marist.edu:3001/sso/login'; +} + +function Login() { return (
Background @@ -16,6 +18,7 @@ function Login() {

Login:

+ Admin? Login here
From de951c9fcd1a2a436660da6322a956b4319bb6ed Mon Sep 17 00:00:00 2001 From: Brendon Kupsch <98063893+BrendonKupsch1@users.noreply.github.com> Date: Fri, 22 Nov 2024 14:53:29 -0500 Subject: [PATCH 033/163] generating new metadata --- server.js | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/server.js b/server.js index 03a111b..d62e01c 100644 --- a/server.js +++ b/server.js @@ -8,6 +8,7 @@ const fs = require('fs'); const passport = require('passport'); const SamlStrategy = require('passport-saml').Strategy; const session = require('express-session'); +const metadata = require('passport-saml-metadata'); const app = express(); @@ -77,6 +78,23 @@ passport.deserializeUser((user, done) => { done(null, user); }); +// Route to server SP metadata +app.get('/metadata', (req, res) => { + const decryptionCert = fs.readFileSync('./backend/facelect.capping.ecrl.marist.edu.key', 'utf-8'); + const signingCert = fs.readFileSync('./backend/2024_facelect.capping.ecrl.marist.edu.crt', 'utf-8'); + + const metadata = { + callbackUrl: 'https://facelect.capping.ecrl.marist.edu:3001/login/callback', + issuer: 'https://facelect.capping.ecrl.marist.edu', + cert: signingCert, + decryptionPvk: decryptionCert, + }; + + const xml = metadata.generate(metadata); + res.type('application/xml'); + res.send(xml); +}); + // Route to handle admin login app.post('/admin-login', async (req, res) => { const { username, password } = req.body; // Capture username and password from request From 0d28fd27fcbf9e77359d034bc3b091ec77917933 Mon Sep 17 00:00:00 2001 From: Brendon Kupsch <98063893+BrendonKupsch1@users.noreply.github.com> Date: Fri, 22 Nov 2024 14:57:30 -0500 Subject: [PATCH 034/163] generating new metadata test --- src/App.tsx | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/App.tsx b/src/App.tsx index 1b648d5..146801f 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -25,6 +25,9 @@ function App() { {/* Route for the SSO redirect */} } /> + + {/* Catch-all route to redirect to the login page */} + } /> From d771f88b99e082e0651d40fb895135a89febba3e Mon Sep 17 00:00:00 2001 From: Brendon Kupsch <98063893+BrendonKupsch1@users.noreply.github.com> Date: Fri, 22 Nov 2024 15:00:22 -0500 Subject: [PATCH 035/163] undoing changes for metadata --- server.js | 18 ------------------ src/App.tsx | 3 --- 2 files changed, 21 deletions(-) diff --git a/server.js b/server.js index d62e01c..03a111b 100644 --- a/server.js +++ b/server.js @@ -8,7 +8,6 @@ const fs = require('fs'); const passport = require('passport'); const SamlStrategy = require('passport-saml').Strategy; const session = require('express-session'); -const metadata = require('passport-saml-metadata'); const app = express(); @@ -78,23 +77,6 @@ passport.deserializeUser((user, done) => { done(null, user); }); -// Route to server SP metadata -app.get('/metadata', (req, res) => { - const decryptionCert = fs.readFileSync('./backend/facelect.capping.ecrl.marist.edu.key', 'utf-8'); - const signingCert = fs.readFileSync('./backend/2024_facelect.capping.ecrl.marist.edu.crt', 'utf-8'); - - const metadata = { - callbackUrl: 'https://facelect.capping.ecrl.marist.edu:3001/login/callback', - issuer: 'https://facelect.capping.ecrl.marist.edu', - cert: signingCert, - decryptionPvk: decryptionCert, - }; - - const xml = metadata.generate(metadata); - res.type('application/xml'); - res.send(xml); -}); - // Route to handle admin login app.post('/admin-login', async (req, res) => { const { username, password } = req.body; // Capture username and password from request diff --git a/src/App.tsx b/src/App.tsx index 146801f..1b648d5 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -25,9 +25,6 @@ function App() { {/* Route for the SSO redirect */} } /> - - {/* Catch-all route to redirect to the login page */} - } /> From b3b62a1a55e2941f4661456487c23c1da31bb023 Mon Sep 17 00:00:00 2001 From: Brendon Kupsch <98063893+BrendonKupsch1@users.noreply.github.com> Date: Fri, 22 Nov 2024 15:02:25 -0500 Subject: [PATCH 036/163] generate metadata test --- server.js | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/server.js b/server.js index 03a111b..21fbeea 100644 --- a/server.js +++ b/server.js @@ -8,6 +8,7 @@ const fs = require('fs'); const passport = require('passport'); const SamlStrategy = require('passport-saml').Strategy; const session = require('express-session'); +const metadata = require('passport-saml-metadata'); const app = express(); @@ -77,6 +78,23 @@ passport.deserializeUser((user, done) => { done(null, user); }); +// Route to serve SP metadata +app.get('/metadata', (req, res) => { + const decryptionCert = fs.readFileSync('./backend/facelect.capping.ecrl.marist.edu.key', 'utf-8'); + const signingCert = fs.readFileSync('./backend/2024_facelect.capping.ecrl.marist.edu.crt', 'utf-8'); + + const metadata = { + callbackUrl: 'https://facelect.capping.ecrl.marist.edu/login/callback', + issuer: 'https://facelect.capping.ecrl.marist.edu', + cert: signingCert, + decryptionPvk: decryptionCert, + }; + + const xml = metadata.generate(metadata); + res.type('application/xml'); + res.send(xml); +}); + // Route to handle admin login app.post('/admin-login', async (req, res) => { const { username, password } = req.body; // Capture username and password from request From b93ad52edf892502b84cff06b552e0c0d262eb48 Mon Sep 17 00:00:00 2001 From: Brendon Kupsch <98063893+BrendonKupsch1@users.noreply.github.com> Date: Fri, 22 Nov 2024 15:07:01 -0500 Subject: [PATCH 037/163] attempt to generate metadata --- server.js | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/server.js b/server.js index 21fbeea..248f387 100644 --- a/server.js +++ b/server.js @@ -8,7 +8,6 @@ const fs = require('fs'); const passport = require('passport'); const SamlStrategy = require('passport-saml').Strategy; const session = require('express-session'); -const metadata = require('passport-saml-metadata'); const app = express(); @@ -80,19 +79,8 @@ passport.deserializeUser((user, done) => { // Route to serve SP metadata app.get('/metadata', (req, res) => { - const decryptionCert = fs.readFileSync('./backend/facelect.capping.ecrl.marist.edu.key', 'utf-8'); - const signingCert = fs.readFileSync('./backend/2024_facelect.capping.ecrl.marist.edu.crt', 'utf-8'); - - const metadata = { - callbackUrl: 'https://facelect.capping.ecrl.marist.edu/login/callback', - issuer: 'https://facelect.capping.ecrl.marist.edu', - cert: signingCert, - decryptionPvk: decryptionCert, - }; - - const xml = metadata.generate(metadata); res.type('application/xml'); - res.send(xml); + res.status(200).send(samlStrategy.generateServiceProviderMetadata(fs.readFileSync('./backend/2024_facelect.capping.ecrl.marist.edu.crt', 'utf-8'))); }); // Route to handle admin login From 054899a29fb3feecca3342dd894e5f6848f0cf10 Mon Sep 17 00:00:00 2001 From: Brendon Kupsch <98063893+BrendonKupsch1@users.noreply.github.com> Date: Fri, 22 Nov 2024 15:09:23 -0500 Subject: [PATCH 038/163] metadata generation attempt --- server.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/server.js b/server.js index 248f387..48d57e4 100644 --- a/server.js +++ b/server.js @@ -52,7 +52,7 @@ const hashPassword = (password) => { }; // Passport SAML strategy configuration -passport.use(new SamlStrategy( +const samlStrategy = new SamlStrategy( { path: '/login/callback', entryPoint: 'https://auth.it.marist.edu/idp/profile/SAML2/Redirect/SSO', @@ -66,9 +66,11 @@ passport.use(new SamlStrategy( } return done(null, user); }); - }) + } ); +passport.use(samlStrategy); + passport.serializeUser((user, done) => { done(null, user); }); From 541a6b1ee12d8fc7ed809f77962fc5b2e93a02b9 Mon Sep 17 00:00:00 2001 From: Brendon Kupsch Date: Mon, 2 Dec 2024 15:08:39 -0500 Subject: [PATCH 039/163] Removed port numbers --- .server.js.swp | Bin 0 -> 1024 bytes server.js | 3 ++- src/AdminLogin.tsx | 3 ++- src/Login.tsx | 4 ++-- 4 files changed, 6 insertions(+), 4 deletions(-) create mode 100644 .server.js.swp diff --git a/.server.js.swp b/.server.js.swp new file mode 100644 index 0000000000000000000000000000000000000000..16abd27852571c523b757fa17bdd7d7e38aff223 GIT binary patch literal 1024 zcmYc?$V<%2S1{KzVn6|wwG0eJ`S~R%f;c$7iA9;kC2onyt~sg6B`%32iAjmYsbRk8 a%8OHr%2JE;vWn3qM){*5Fd6~_5&{4V_!2Py literal 0 HcmV?d00001 diff --git a/server.js b/server.js index 48d57e4..51a6784 100644 --- a/server.js +++ b/server.js @@ -14,6 +14,7 @@ const app = express(); // List of allowed origins const allowedOrigins = [ 'https://facelect.capping.ecrl.marist.edu', + 'https://auth.it.marist.edu/idp', ]; // Configure CORS to allow requests from your React app @@ -160,4 +161,4 @@ const options = { // Create HTTPS server on port 3001 https.createServer(options, app).listen(3001, () => { console.log('HTTPS Server running on port 3001'); -}); \ No newline at end of file +}); diff --git a/src/AdminLogin.tsx b/src/AdminLogin.tsx index 058c1c3..27341a1 100644 --- a/src/AdminLogin.tsx +++ b/src/AdminLogin.tsx @@ -17,7 +17,8 @@ const AdminLogin: React.FC = () => { const handleSubmit = async (e: FormEvent) => { e.preventDefault(); try { - const response = await fetch('https://facelect.capping.ecrl.marist.edu', { + console.log("login submitted"); + const response = await fetch('https://facelect.capping.ecrl.marist.edu:3001/admin-login', { method: 'POST', headers: { 'Content-Type': 'application/json', diff --git a/src/Login.tsx b/src/Login.tsx index 3090bb8..a744c3b 100644 --- a/src/Login.tsx +++ b/src/Login.tsx @@ -6,7 +6,7 @@ import Footer from './components/footer/footer'; function handleSSOLogin() { console.log('going to the /login') - window.location.href = 'https://facelect.capping.ecrl.marist.edu:3001/sso/login'; + window.location.href = 'https://facelect.capping.ecrl.marist.edu/sso/login'; } @@ -25,4 +25,4 @@ function Login() { ); } -export default Login; \ No newline at end of file +export default Login; From 41fab44d8fe216cdba688a2569ee3baca9bad24c Mon Sep 17 00:00:00 2001 From: Brendon Kupsch <98063893+BrendonKupsch1@users.noreply.github.com> Date: Mon, 2 Dec 2024 15:11:24 -0500 Subject: [PATCH 040/163] Fixed cors issue --- server.js | 6 ++---- src/Login.tsx | 2 +- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/server.js b/server.js index 48d57e4..248f387 100644 --- a/server.js +++ b/server.js @@ -52,7 +52,7 @@ const hashPassword = (password) => { }; // Passport SAML strategy configuration -const samlStrategy = new SamlStrategy( +passport.use(new SamlStrategy( { path: '/login/callback', entryPoint: 'https://auth.it.marist.edu/idp/profile/SAML2/Redirect/SSO', @@ -66,11 +66,9 @@ const samlStrategy = new SamlStrategy( } return done(null, user); }); - } + }) ); -passport.use(samlStrategy); - passport.serializeUser((user, done) => { done(null, user); }); diff --git a/src/Login.tsx b/src/Login.tsx index 3090bb8..cfd65d0 100644 --- a/src/Login.tsx +++ b/src/Login.tsx @@ -6,7 +6,7 @@ import Footer from './components/footer/footer'; function handleSSOLogin() { console.log('going to the /login') - window.location.href = 'https://facelect.capping.ecrl.marist.edu:3001/sso/login'; + window.location.href = 'https://facelect.capping.ecrl.marist.edu/sso/login'; } From da78faebc879ec6d4823883729e89b8638689fc1 Mon Sep 17 00:00:00 2001 From: Brendon Kupsch Date: Mon, 2 Dec 2024 15:43:50 -0500 Subject: [PATCH 041/163] Fixing staged changes --- package-lock.json | 69 +++++++++++++++++++++++++---------------------- src/App.tsx | 11 ++------ 2 files changed, 39 insertions(+), 41 deletions(-) diff --git a/package-lock.json b/package-lock.json index 9bfce81..df8af5b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -6390,9 +6390,10 @@ "integrity": "sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==" }, "node_modules/cookie": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.6.0.tgz", - "integrity": "sha512-U71cyTamuh1CRNCfpGY6to28lxvNwPG4Guz/EVjgf3Jmzv0vlDp1atT9eS5dDjMYHucpHbWns6Lwf3BKz6svdw==", + "version": "0.7.1", + "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.7.1.tgz", + "integrity": "sha512-6DnInpx7SJ2AK3+CTUE/ZM0vWTUboZCegxhC2xiIydHR9jNuTAASBrfEpHhiGOZw/nX51bHt6YQl8jsGo4y/0w==", + "license": "MIT", "engines": { "node": ">= 0.6" } @@ -6468,9 +6469,10 @@ } }, "node_modules/cross-spawn": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", - "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", + "version": "7.0.6", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz", + "integrity": "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==", + "license": "MIT", "dependencies": { "path-key": "^3.1.0", "shebang-command": "^2.0.0", @@ -8350,16 +8352,17 @@ } }, "node_modules/express": { - "version": "4.21.0", - "resolved": "https://registry.npmjs.org/express/-/express-4.21.0.tgz", - "integrity": "sha512-VqcNGcj/Id5ZT1LZ/cfihi3ttTn+NJmkli2eZADigjq29qTlWi/hAQ43t/VLPq8+UX06FCEx3ByOYet6ZFblng==", + "version": "4.21.1", + "resolved": "https://registry.npmjs.org/express/-/express-4.21.1.tgz", + "integrity": "sha512-YSFlK1Ee0/GC8QaO91tHcDxJiE/X4FbpAyQWkxAvG6AXCuR65YzK8ua6D9hvi/TzUfZMpc+BwuM1IPw8fmQBiQ==", + "license": "MIT", "dependencies": { "accepts": "~1.3.8", "array-flatten": "1.1.1", "body-parser": "1.20.3", "content-disposition": "0.5.4", "content-type": "~1.0.4", - "cookie": "0.6.0", + "cookie": "0.7.1", "cookie-signature": "1.0.6", "debug": "2.6.9", "depd": "2.0.0", @@ -9548,9 +9551,10 @@ } }, "node_modules/http-proxy-middleware": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/http-proxy-middleware/-/http-proxy-middleware-2.0.6.tgz", - "integrity": "sha512-ya/UeJ6HVBYxrgYotAZo1KvPWlgB48kUJLDePFeneHsVujFaW5WNj2NgWCAE//B1Dl02BIfYlpNgBy8Kf8Rjmw==", + "version": "2.0.7", + "resolved": "https://registry.npmjs.org/http-proxy-middleware/-/http-proxy-middleware-2.0.7.tgz", + "integrity": "sha512-fgVY8AV7qU7z/MmXJ/rxwbrtQH4jBQ9m7kp3llF0liB7glmFeVZFBepQb32T3y8n8k2+AEYuMPCpinYW+/CuRA==", + "license": "MIT", "dependencies": { "@types/http-proxy": "^1.17.8", "http-proxy": "^1.18.1", @@ -15874,9 +15878,10 @@ } }, "node_modules/rollup": { - "version": "2.79.1", - "resolved": "https://registry.npmjs.org/rollup/-/rollup-2.79.1.tgz", - "integrity": "sha512-uKxbd0IhMZOhjAiD5oAFp7BqvkA4Dv47qpOCtaNvng4HBwdbWtdOh8f5nZNuk2rp51PMGk3bzfWu5oayNEuYnw==", + "version": "2.79.2", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-2.79.2.tgz", + "integrity": "sha512-fS6iqSPZDs3dr/y7Od6y5nha8dW1YnbgtsyotCVvoFGKbERG++CVRFv1meyGDE1SNItQA8BrnCw7ScdAhRJ3XQ==", + "license": "MIT", "bin": { "rollup": "dist/bin/rollup" }, @@ -23342,9 +23347,9 @@ "integrity": "sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==" }, "cookie": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.6.0.tgz", - "integrity": "sha512-U71cyTamuh1CRNCfpGY6to28lxvNwPG4Guz/EVjgf3Jmzv0vlDp1atT9eS5dDjMYHucpHbWns6Lwf3BKz6svdw==" + "version": "0.7.1", + "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.7.1.tgz", + "integrity": "sha512-6DnInpx7SJ2AK3+CTUE/ZM0vWTUboZCegxhC2xiIydHR9jNuTAASBrfEpHhiGOZw/nX51bHt6YQl8jsGo4y/0w==" }, "cookie-signature": { "version": "1.0.6", @@ -23396,9 +23401,9 @@ } }, "cross-spawn": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", - "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", + "version": "7.0.6", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz", + "integrity": "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==", "requires": { "path-key": "^3.1.0", "shebang-command": "^2.0.0", @@ -24722,16 +24727,16 @@ } }, "express": { - "version": "4.21.0", - "resolved": "https://registry.npmjs.org/express/-/express-4.21.0.tgz", - "integrity": "sha512-VqcNGcj/Id5ZT1LZ/cfihi3ttTn+NJmkli2eZADigjq29qTlWi/hAQ43t/VLPq8+UX06FCEx3ByOYet6ZFblng==", + "version": "4.21.1", + "resolved": "https://registry.npmjs.org/express/-/express-4.21.1.tgz", + "integrity": "sha512-YSFlK1Ee0/GC8QaO91tHcDxJiE/X4FbpAyQWkxAvG6AXCuR65YzK8ua6D9hvi/TzUfZMpc+BwuM1IPw8fmQBiQ==", "requires": { "accepts": "~1.3.8", "array-flatten": "1.1.1", "body-parser": "1.20.3", "content-disposition": "0.5.4", "content-type": "~1.0.4", - "cookie": "0.6.0", + "cookie": "0.7.1", "cookie-signature": "1.0.6", "debug": "2.6.9", "depd": "2.0.0", @@ -25596,9 +25601,9 @@ } }, "http-proxy-middleware": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/http-proxy-middleware/-/http-proxy-middleware-2.0.6.tgz", - "integrity": "sha512-ya/UeJ6HVBYxrgYotAZo1KvPWlgB48kUJLDePFeneHsVujFaW5WNj2NgWCAE//B1Dl02BIfYlpNgBy8Kf8Rjmw==", + "version": "2.0.7", + "resolved": "https://registry.npmjs.org/http-proxy-middleware/-/http-proxy-middleware-2.0.7.tgz", + "integrity": "sha512-fgVY8AV7qU7z/MmXJ/rxwbrtQH4jBQ9m7kp3llF0liB7glmFeVZFBepQb32T3y8n8k2+AEYuMPCpinYW+/CuRA==", "requires": { "@types/http-proxy": "^1.17.8", "http-proxy": "^1.18.1", @@ -29920,9 +29925,9 @@ } }, "rollup": { - "version": "2.79.1", - "resolved": "https://registry.npmjs.org/rollup/-/rollup-2.79.1.tgz", - "integrity": "sha512-uKxbd0IhMZOhjAiD5oAFp7BqvkA4Dv47qpOCtaNvng4HBwdbWtdOh8f5nZNuk2rp51PMGk3bzfWu5oayNEuYnw==", + "version": "2.79.2", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-2.79.2.tgz", + "integrity": "sha512-fS6iqSPZDs3dr/y7Od6y5nha8dW1YnbgtsyotCVvoFGKbERG++CVRFv1meyGDE1SNItQA8BrnCw7ScdAhRJ3XQ==", "requires": { "fsevents": "~2.3.2" } diff --git a/src/App.tsx b/src/App.tsx index 1b648d5..59a94d1 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -3,7 +3,7 @@ import { BrowserRouter as Router, Routes, Route, Navigate } from 'react-router-d import Login from './Login'; // Login component import AdminLogin from './AdminLogin'; // Admin login component import AdminView from './AdminView'; // Admin view component -import UserProfile from './UserProfile'; // User profile component +import UserProfile from './UserProfile'; // User profile component import { AuthProvider, useAuth } from './AuthContext'; // Adjust the path as necessary function App() { @@ -23,8 +23,7 @@ function App() { {/* Route for the user profile page */} } /> - {/* Route for the SSO redirect */} - } /> + @@ -44,11 +43,5 @@ const ProtectedAdminRoute = () => { ); }; -const SSORedirect: React.FC = () => { - React.useEffect(() => { - window.location.href = '/sso/login'; // Redirect to the server-side SSO login route - }, []); - return
Redirecting...
; -}; export default App; From e3cb940b5414f1ca67634455ebaa76e549fed80e Mon Sep 17 00:00:00 2001 From: Brendon Kupsch Date: Mon, 2 Dec 2024 17:05:47 -0500 Subject: [PATCH 042/163] Admin view fixes --- src/AdminView.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/AdminView.tsx b/src/AdminView.tsx index e6d6d95..898c9e4 100644 --- a/src/AdminView.tsx +++ b/src/AdminView.tsx @@ -87,7 +87,7 @@ const App: React.FC = () => { useEffect(() => { - fetch('https://facelect.capping.ecrl.marist.edu/faculty') + fetch('https://facelect.capping.ecrl.marist.edu:3001/faculty') .then(response => response.json()) .then(data => setRowData(data)) .catch(error => console.error('Error fetching data:', error)); From 5e5f2d8fe78957e0d50036921096709fe9abac4c Mon Sep 17 00:00:00 2001 From: Brendon Kupsch <98063893+BrendonKupsch1@users.noreply.github.com> Date: Mon, 2 Dec 2024 17:30:03 -0500 Subject: [PATCH 043/163] Attepting to fix /sso/login --- src/App.tsx | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/App.tsx b/src/App.tsx index 59a94d1..789aa27 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -22,8 +22,6 @@ function App() { {/* Route for the user profile page */} } /> - - From 761644efc685afcf5e67d12e51142160040be5ca Mon Sep 17 00:00:00 2001 From: Brendon Kupsch <98063893+BrendonKupsch1@users.noreply.github.com> Date: Mon, 2 Dec 2024 17:30:53 -0500 Subject: [PATCH 044/163] sso/login route testing --- src/App.tsx | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/App.tsx b/src/App.tsx index 789aa27..fa2b225 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -22,6 +22,9 @@ function App() { {/* Route for the user profile page */} } /> + + {/* Route for the SSO login page */} + Redirecting to SSO login...} /> From 8f4a009d63aaf318629277b33c9a7bdd9440708d Mon Sep 17 00:00:00 2001 From: Brendon Kupsch Date: Wed, 4 Dec 2024 16:35:39 -0500 Subject: [PATCH 045/163] Updated routing logic for sso login --- src/App.tsx | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/App.tsx b/src/App.tsx index fa2b225..0a80972 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -1,10 +1,11 @@ -import React from 'react'; +import React, { useEffect } from 'react'; import { BrowserRouter as Router, Routes, Route, Navigate } from 'react-router-dom'; import Login from './Login'; // Login component import AdminLogin from './AdminLogin'; // Admin login component import AdminView from './AdminView'; // Admin view component import UserProfile from './UserProfile'; // User profile component import { AuthProvider, useAuth } from './AuthContext'; // Adjust the path as necessary +import { useNavigate } from 'react-router-dom'; function App() { return ( @@ -24,7 +25,7 @@ function App() { } /> {/* Route for the SSO login page */} - Redirecting to SSO login...} /> + } /> @@ -44,5 +45,12 @@ const ProtectedAdminRoute = () => { ); }; +const SsoLoginRedirect: React.FC = () => { + useEffect(() => { + window.location.href = 'https://facelect.capping.ecrl.marist.edu:3001/sso/login'; + }, []); + + return
Redirecting to SSO login...
; +}; export default App; From bf7b9430b09f274efd9091c0bc4e5e0e0bde4cac Mon Sep 17 00:00:00 2001 From: Kai Date: Wed, 4 Dec 2024 22:47:52 -0500 Subject: [PATCH 046/163] changes to passport --- server.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/server.js b/server.js index c064f8a..fb0208b 100644 --- a/server.js +++ b/server.js @@ -15,6 +15,7 @@ const app = express(); const allowedOrigins = [ 'https://facelect.capping.ecrl.marist.edu', 'https://auth.it.marist.edu/idp', + 'https://facelect.capping.ecrl.marist.edu:3001/login/callback', ]; // Configure CORS to allow requests from your React app @@ -55,6 +56,8 @@ const hashPassword = (password) => { // Passport SAML strategy configuration passport.use(new SamlStrategy( { + // Explicitly define the Assertion Consumer Service URL + callbackUrl: 'http://facelect.capping.ecrl.marist.edu:3001/login/callback', path: '/login/callback', entryPoint: 'https://auth.it.marist.edu/idp/profile/SAML2/Redirect/SSO', issuer: 'https://facelect.capping.ecrl.marist.edu', From 733b7e39fc60ff6f33254fa0e57583a0cc08cc0e Mon Sep 17 00:00:00 2001 From: Brendon Kupsch Date: Wed, 4 Dec 2024 22:59:47 -0500 Subject: [PATCH 047/163] testing login route fix --- src/App.tsx | 8 -------- 1 file changed, 8 deletions(-) diff --git a/src/App.tsx b/src/App.tsx index 0a80972..cd50bf8 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -24,8 +24,6 @@ function App() { {/* Route for the user profile page */} } /> - {/* Route for the SSO login page */} - } /> @@ -45,12 +43,6 @@ const ProtectedAdminRoute = () => { ); }; -const SsoLoginRedirect: React.FC = () => { - useEffect(() => { - window.location.href = 'https://facelect.capping.ecrl.marist.edu:3001/sso/login'; - }, []); - return
Redirecting to SSO login...
; -}; export default App; From ef58c254b51eaa642925d0b39825ac1b3af56ea1 Mon Sep 17 00:00:00 2001 From: Brendon Kupsch Date: Wed, 4 Dec 2024 23:04:49 -0500 Subject: [PATCH 048/163] Revert "testing login route fix" This reverts commit 733b7e39fc60ff6f33254fa0e57583a0cc08cc0e. --- src/App.tsx | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/App.tsx b/src/App.tsx index cd50bf8..0a80972 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -24,6 +24,8 @@ function App() { {/* Route for the user profile page */} } /> + {/* Route for the SSO login page */} + } /> @@ -43,6 +45,12 @@ const ProtectedAdminRoute = () => { ); }; +const SsoLoginRedirect: React.FC = () => { + useEffect(() => { + window.location.href = 'https://facelect.capping.ecrl.marist.edu:3001/sso/login'; + }, []); + return
Redirecting to SSO login...
; +}; export default App; From d50f04c05db075f389f9ee9e2f956dbfcb53fb4e Mon Sep 17 00:00:00 2001 From: Brendon Kupsch Date: Wed, 4 Dec 2024 23:07:34 -0500 Subject: [PATCH 049/163] Cors policy changes --- server.js | 2 +- src/Login.tsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/server.js b/server.js index fb0208b..5f17b4f 100644 --- a/server.js +++ b/server.js @@ -15,7 +15,7 @@ const app = express(); const allowedOrigins = [ 'https://facelect.capping.ecrl.marist.edu', 'https://auth.it.marist.edu/idp', - 'https://facelect.capping.ecrl.marist.edu:3001/login/callback', + 'https://api-a1cc77df.duosecurity.com', ]; // Configure CORS to allow requests from your React app diff --git a/src/Login.tsx b/src/Login.tsx index a744c3b..fedbd53 100644 --- a/src/Login.tsx +++ b/src/Login.tsx @@ -6,7 +6,7 @@ import Footer from './components/footer/footer'; function handleSSOLogin() { console.log('going to the /login') - window.location.href = 'https://facelect.capping.ecrl.marist.edu/sso/login'; + window.location.href = 'https://facelect.capping.ecrl.marist.edu:3001/sso/login'; } From b1dfc542bacfb90956586e34e270e204269f009d Mon Sep 17 00:00:00 2001 From: Brendon Kupsch Date: Wed, 4 Dec 2024 23:10:16 -0500 Subject: [PATCH 050/163] asterisk allow all cors --- server.js | 1 + 1 file changed, 1 insertion(+) diff --git a/server.js b/server.js index 5f17b4f..19dc98f 100644 --- a/server.js +++ b/server.js @@ -16,6 +16,7 @@ const allowedOrigins = [ 'https://facelect.capping.ecrl.marist.edu', 'https://auth.it.marist.edu/idp', 'https://api-a1cc77df.duosecurity.com', + '*', ]; // Configure CORS to allow requests from your React app From 3b09b92872c8d163eb255aee519c684f98e39658 Mon Sep 17 00:00:00 2001 From: Brendon Kupsch Date: Wed, 4 Dec 2024 23:11:13 -0500 Subject: [PATCH 051/163] cors policy changes --- server.js | 1 + 1 file changed, 1 insertion(+) diff --git a/server.js b/server.js index 19dc98f..e67249d 100644 --- a/server.js +++ b/server.js @@ -16,6 +16,7 @@ const allowedOrigins = [ 'https://facelect.capping.ecrl.marist.edu', 'https://auth.it.marist.edu/idp', 'https://api-a1cc77df.duosecurity.com', + 'https://facelect.capping.ecrl.marist.edu:3001/login/callback', '*', ]; From 65600107af564f71ab33bd3b1e4a223ad6e3a1ce Mon Sep 17 00:00:00 2001 From: Brendon Kupsch Date: Wed, 4 Dec 2024 23:15:23 -0500 Subject: [PATCH 052/163] updated cors policy --- server.js | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/server.js b/server.js index e67249d..9a178c7 100644 --- a/server.js +++ b/server.js @@ -20,18 +20,7 @@ const allowedOrigins = [ '*', ]; -// Configure CORS to allow requests from your React app -app.use(cors({ - origin: function (origin, callback) { - // Allow requests with no origin (like mobile apps or curl requests) - if (!origin) return callback(null, true); - if (allowedOrigins.indexOf(origin) === -1) { - const msg = 'The CORS policy for this site does not allow access from the specified Origin.'; - return callback(new Error(msg), false); - } - return callback(null, true); - } -})); +app.use(cors()); app.use(express.json()); // Parse incoming JSON data From d06aa874425a827bab2561b80eda7711836d644c Mon Sep 17 00:00:00 2001 From: Brendon Kupsch Date: Wed, 4 Dec 2024 23:19:05 -0500 Subject: [PATCH 053/163] removed /sso/login from frontend --- src/App.tsx | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/src/App.tsx b/src/App.tsx index 0a80972..9f27a95 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -23,9 +23,6 @@ function App() { {/* Route for the user profile page */} } /> - - {/* Route for the SSO login page */} - } /> @@ -45,12 +42,5 @@ const ProtectedAdminRoute = () => { ); }; -const SsoLoginRedirect: React.FC = () => { - useEffect(() => { - window.location.href = 'https://facelect.capping.ecrl.marist.edu:3001/sso/login'; - }, []); - - return
Redirecting to SSO login...
; -}; export default App; From 51ec81a6b7d074c0f5a0b10c0fc34c717b13fdce Mon Sep 17 00:00:00 2001 From: Brendon Kupsch Date: Wed, 4 Dec 2024 23:27:15 -0500 Subject: [PATCH 054/163] fixed user-profile casing --- src/App.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/App.tsx b/src/App.tsx index 9f27a95..e13d0fa 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -22,7 +22,7 @@ function App() { } /> {/* Route for the user profile page */} - } /> + } /> From dd3d4be0ac781b44c8e69811957298557def4012 Mon Sep 17 00:00:00 2001 From: Brendon Kupsch Date: Wed, 4 Dec 2024 23:36:37 -0500 Subject: [PATCH 055/163] server.js update --- server.js | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/server.js b/server.js index 9a178c7..d35d942 100644 --- a/server.js +++ b/server.js @@ -8,6 +8,7 @@ const fs = require('fs'); const passport = require('passport'); const SamlStrategy = require('passport-saml').Strategy; const session = require('express-session'); +const bodyParser = require("body-parser"); const app = express(); @@ -129,20 +130,22 @@ app.get('/faculty', async (req, res) => { } }); -// SSO login route -app.get('/sso/login', passport.authenticate('saml', { - successRedirect: '/user-profile', - failureRedirect: '/login' -})); - // SSO callback route -app.post('/login/callback', passport.authenticate('saml', { +app.post('/login/callback', + bodyParser.urlencoded({ extended: false }), + passport.authenticate('saml', { failureRedirect: '/login', failureFlash: true }), (req, res) => { res.redirect('/user-profile'); }); +// SSO login route +app.get('/sso/login', passport.authenticate('saml', { + successRedirect: '/user-profile', + failureRedirect: '/login' +})); + // Read SSL certificate and key const options = { key: fs.readFileSync('./backend/facelect.capping.ecrl.marist.edu.key'), From c8579489afa6ce1ee5bd0e54e69f292d792a4f76 Mon Sep 17 00:00:00 2001 From: Brendon Kupsch Date: Wed, 4 Dec 2024 23:41:20 -0500 Subject: [PATCH 056/163] Removed port from callbackUrl --- server.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server.js b/server.js index d35d942..0040e57 100644 --- a/server.js +++ b/server.js @@ -49,7 +49,7 @@ const hashPassword = (password) => { passport.use(new SamlStrategy( { // Explicitly define the Assertion Consumer Service URL - callbackUrl: 'http://facelect.capping.ecrl.marist.edu:3001/login/callback', + callbackUrl: 'http://facelect.capping.ecrl.marist.edu/login/callback', path: '/login/callback', entryPoint: 'https://auth.it.marist.edu/idp/profile/SAML2/Redirect/SSO', issuer: 'https://facelect.capping.ecrl.marist.edu', From 536399ba7dd675b175546f3fc505b8833f7ed903 Mon Sep 17 00:00:00 2001 From: Brendon Kupsch Date: Wed, 4 Dec 2024 23:58:10 -0500 Subject: [PATCH 057/163] undid callbackURL change --- .server.js.swp | Bin 1024 -> 0 bytes server.js | 2 +- 2 files changed, 1 insertion(+), 1 deletion(-) delete mode 100644 .server.js.swp diff --git a/.server.js.swp b/.server.js.swp deleted file mode 100644 index 16abd27852571c523b757fa17bdd7d7e38aff223..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1024 zcmYc?$V<%2S1{KzVn6|wwG0eJ`S~R%f;c$7iA9;kC2onyt~sg6B`%32iAjmYsbRk8 a%8OHr%2JE;vWn3qM){*5Fd6~_5&{4V_!2Py diff --git a/server.js b/server.js index 0040e57..d35d942 100644 --- a/server.js +++ b/server.js @@ -49,7 +49,7 @@ const hashPassword = (password) => { passport.use(new SamlStrategy( { // Explicitly define the Assertion Consumer Service URL - callbackUrl: 'http://facelect.capping.ecrl.marist.edu/login/callback', + callbackUrl: 'http://facelect.capping.ecrl.marist.edu:3001/login/callback', path: '/login/callback', entryPoint: 'https://auth.it.marist.edu/idp/profile/SAML2/Redirect/SSO', issuer: 'https://facelect.capping.ecrl.marist.edu', From 5080e952613243ad0eab61e565bd789b7162b465 Mon Sep 17 00:00:00 2001 From: Brendon Kupsch Date: Thu, 5 Dec 2024 00:14:16 -0500 Subject: [PATCH 058/163] Cors changes --- server.js | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/server.js b/server.js index d35d942..f62f13a 100644 --- a/server.js +++ b/server.js @@ -19,6 +19,7 @@ const allowedOrigins = [ 'https://api-a1cc77df.duosecurity.com', 'https://facelect.capping.ecrl.marist.edu:3001/login/callback', '*', + 'https://auth.it.marist.edu', ]; app.use(cors()); @@ -56,14 +57,16 @@ passport.use(new SamlStrategy( cert: fs.readFileSync('./backend/idp_metadata.xml', 'utf-8'), }, function(profile, done) { - findByEmail(profile.email, function(err, user) { - if (err) { - return done(err); - } - return done(null, user); - }); - }) -); + console.log('SAML Profile:', profile); + findByEmail(profile.email, (err, user) => { + if (err) { + console.error('Error in SAML callback:', err); + return done(err); + } + return done(null, user); + }); + } +)); passport.serializeUser((user, done) => { done(null, user); From aa20e7b0586f151534e493ab1c360b812e8b034c Mon Sep 17 00:00:00 2001 From: Brendon Kupsch Date: Thu, 5 Dec 2024 00:27:51 -0500 Subject: [PATCH 059/163] Ethan's changes --- backend/idp_cert.pem | 3 +++ server.js | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) create mode 100644 backend/idp_cert.pem diff --git a/backend/idp_cert.pem b/backend/idp_cert.pem new file mode 100644 index 0000000..85085f1 --- /dev/null +++ b/backend/idp_cert.pem @@ -0,0 +1,3 @@ +-----BEGIN CERTIFICATE----- +LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSUc0ekNDQlV1Z0F3SUJBZ0lRSkZ2cS81N1FQU2pSU2o2cEZhV1pFVEFOQmdrcWhraUc5dzBCQVF3RkFEQkUKTVFzd0NRWURWUVFHRXdKVlV6RVNNQkFHQTFVRUNoTUpTVzUwWlhKdVpYUXlNU0V3SHdZRFZRUURFeGhKYmtOdgpiVzF2YmlCU1UwRWdVMlZ5ZG1WeUlFTkJJREl3SGhjTk1qUXhNVEV4TURBd01EQXdXaGNOTWpVeE1qRXlNak0xCk9UVTVXakJrTVFzd0NRWURWUVFHRXdKVlV6RVJNQThHQTFVRUNCTUlUbVYzSUZsdmNtc3hGekFWQmdOVkJBb1QKRGsxaGNtbHpkQ0JEYjJ4c1pXZGxNU2t3SndZRFZRUURFeUJtWVdObGJHVmpkQzVqWVhCd2FXNW5MbVZqY213dQpiV0Z5YVhOMExtVmtkVENDQVNJd0RRWUpLb1pJaHZjTkFRRUJCUUFEZ2d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Myt3THBnTmM3ClBNUk10NnUrSDdPeDVIeERabmFmZnV6dFVpclNqekt0eTkwRTZ6WXFBMTRUM3htaDJwZE93MHNYekdValV5T0wKTnBnT2RjMms3eTYwbU5Eclg2UWpvNitBcW9UTTZpZHhEWmNac0tMWTdueklKWWpURFNxUkFtZVVrSmN0Y0tncwpOZ2QxcnVyYlQ5aUFSOU8vbXErWGpjeURXRXBod0pFQlVEdUsrajdXalh3TUc1SllzMllDZExvQXJnYjNOZXFOCkgxSWFVNmhEa3Y0V3hnZzFxNWczNDRBcVI4ZXdsU1M5dk45UXRLRmhyRjRKbnlQaStXQ2NxQ2pUUE5zbVZsYkYKTVYySWZya3ZRTnRFVlpLK3lpME8zSEpDZzRhR3ExdEVETStSTTNjLzNZbHBXcG5Oc2swRGRWeGhXa21TQkt2VgpuekZKZno4ZEFITXArbDRhdlU4MERKaVQxS3djV1VxLzA2Skpudk5yWmI5Vlk5MkdlcWFWWGZsR2NtbkgrdnJFCkNtZng3SENMY2tqWXA4QXZJeXR6YVA0WS9Id2tLelRITElYQTQvd3VaNzI2L0hPLzIwNXkKLS0tLS1FTkQgQ0VSVElGSUNBVEUtLS0tLQo= +-----END CERTIFICATE----- diff --git a/server.js b/server.js index f62f13a..eacd95e 100644 --- a/server.js +++ b/server.js @@ -54,7 +54,7 @@ passport.use(new SamlStrategy( path: '/login/callback', entryPoint: 'https://auth.it.marist.edu/idp/profile/SAML2/Redirect/SSO', issuer: 'https://facelect.capping.ecrl.marist.edu', - cert: fs.readFileSync('./backend/idp_metadata.xml', 'utf-8'), + cert: fs.readFileSync('./backend/idp_cert.pem', 'utf-8'), }, function(profile, done) { console.log('SAML Profile:', profile); From 46c87dcce1d8a53fa80e91b630cc6ee50325404c Mon Sep 17 00:00:00 2001 From: Brendon Kupsch Date: Thu, 5 Dec 2024 00:28:30 -0500 Subject: [PATCH 060/163] update idp metadata --- backend/idp_metadata.xml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/backend/idp_metadata.xml b/backend/idp_metadata.xml index 2e10895..12434f8 100644 --- a/backend/idp_metadata.xml +++ b/backend/idp_metadata.xml @@ -1,5 +1,5 @@ - + @@ -158,5 +158,4 @@ IlEf+60ae5V8mYuV4eXaYIImm3/IbYNchlMgPOOI30YYwGFLHqYS8BX/Ga0YoEOk - - + \ No newline at end of file From b52a5d161a2221c57e99cb45c51e70d76fb9a5d4 Mon Sep 17 00:00:00 2001 From: Brendon Kupsch Date: Thu, 5 Dec 2024 00:33:30 -0500 Subject: [PATCH 061/163] Ethan's changes --- backend/idp_cert.pem | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/backend/idp_cert.pem b/backend/idp_cert.pem index 85085f1..efe6e3f 100644 --- a/backend/idp_cert.pem +++ b/backend/idp_cert.pem @@ -1,3 +1,19 @@ -----BEGIN CERTIFICATE----- -LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSUc0ekNDQlV1Z0F3SUJBZ0lRSkZ2cS81N1FQU2pSU2o2cEZhV1pFVEFOQmdrcWhraUc5dzBCQVF3RkFEQkUKTVFzd0NRWURWUVFHRXdKVlV6RVNNQkFHQTFVRUNoTUpTVzUwWlhKdVpYUXlNU0V3SHdZRFZRUURFeGhKYmtOdgpiVzF2YmlCU1UwRWdVMlZ5ZG1WeUlFTkJJREl3SGhjTk1qUXhNVEV4TURBd01EQXdXaGNOTWpVeE1qRXlNak0xCk9UVTVXakJrTVFzd0NRWURWUVFHRXdKVlV6RVJNQThHQTFVRUNCTUlUbVYzSUZsdmNtc3hGekFWQmdOVkJBb1QKRGsxaGNtbHpkQ0JEYjJ4c1pXZGxNU2t3SndZRFZRUURFeUJtWVdObGJHVmpkQzVqWVhCd2FXNW5MbVZqY213dQpiV0Z5YVhOMExtVmtkVENDQVNJd0RRWUpLb1pJaHZjTkFRRUJCUUFEZ2dFUEFEQ0NBUW9DZ2dFQkFLWmJBMVFCCk1TZ29lU2pFMmE1cXVpT1N6Yz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+YVhOMExtVmtkVENDQVNJd0RRWUpLb1pJaHZjTkFRRUJCUUFEZ2dFUEFEQ0NBUW9DZ2dF +QkFLWmJBMVFBCk1TZ29lU2pFMmE1cXVpT1N6YzV5OE92K1p5MldNUEhWVHFwa25rNkYz +Q1A2dUZCVklrRS9yV24xT2lDcUNCaisKdyt5WXhZVjAxZjBVUXJDSTlVTWJ4ZWlWdUhE +d1hzanhwNEoweG5MTU1WQXh4MGlOTWhrY1RSS0dwU3I4MjNoNgpsYUVJTGcxTFRHQlJY +MGg1M3BJUTNSTE42UWZjZk5UanNNZW8veXBnNnJUbUViWXcyT1grRmMybXVVQ01oTTFJ +Ck1VTUJSTkozOTVCaWdBbGlBbmdrQWFST0hNd2lPSXk1NDhyVk02NFliQjhJclNhZFFP +ZzJxWVkylMcVVlNDc1NEaUMzClc0S0RHTXBlZWZETzdHaHc0M0ZmZmtnN2xycE9SRjlk +Qm5INjFKak9oY3EwaTZpeUM3NmRtQ3lLY1A3RUlZdjQKMXpxcU1VMnZwQ3VneVR0bmFP +bzBQUUd0QUFBQUFaTWM2M0oyQUFBRUF3QkdNRVFDSUdSSkhULzBYSnhpSlh1MXoKLS0t +LS1FTkQgQ0VSVElGSUNBVEUtLS0tLQ= -----END CERTIFICATE----- From 5a94ddcb4ec97fdfb04e80fd54109a6c9d9743b5 Mon Sep 17 00:00:00 2001 From: Brendon Kupsch Date: Thu, 5 Dec 2024 00:34:10 -0500 Subject: [PATCH 062/163] Certificate white space removed --- backend/2024_facelect.capping.ecrl.marist.edu.crt | 2 +- backend/idp_cert.pem | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/backend/2024_facelect.capping.ecrl.marist.edu.crt b/backend/2024_facelect.capping.ecrl.marist.edu.crt index a06b416..75e8a08 100644 --- a/backend/2024_facelect.capping.ecrl.marist.edu.crt +++ b/backend/2024_facelect.capping.ecrl.marist.edu.crt @@ -36,4 +36,4 @@ H1IaU6hDkv4Wxgg1q5g344AqR8ewlSS9vN9QtKFhrF4JnyPi+WCcqCjTPNsmVlbF MV2IfrkvQNtEVZK+yi0O3HJCg4aGq1tEDM+RM3c/3YlpWpnNsk0DdVxhWkmSBKvV nzFJfz8dAHMp+l4avU80DJiT1KwcWUq/06JJnvNrZb9VY92GeqaVXflGcmnH+vrE Cmfx7HCLckjYp8AvIytzaP4Y/HwkKzTHLIXA4/wuZ726/HO/205y ------END CERTIFICATE----- +-----END CERTIFICATE----- \ No newline at end of file diff --git a/backend/idp_cert.pem b/backend/idp_cert.pem index 85085f1..533083d 100644 --- a/backend/idp_cert.pem +++ b/backend/idp_cert.pem @@ -1,3 +1,3 @@ -----BEGIN CERTIFICATE----- LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSUc0ekNDQlV1Z0F3SUJBZ0lRSkZ2cS81N1FQU2pSU2o2cEZhV1pFVEFOQmdrcWhraUc5dzBCQVF3RkFEQkUKTVFzd0NRWURWUVFHRXdKVlV6RVNNQkFHQTFVRUNoTUpTVzUwWlhKdVpYUXlNU0V3SHdZRFZRUURFeGhKYmtOdgpiVzF2YmlCU1UwRWdVMlZ5ZG1WeUlFTkJJREl3SGhjTk1qUXhNVEV4TURBd01EQXdXaGNOTWpVeE1qRXlNak0xCk9UVTVXakJrTVFzd0NRWURWUVFHRXdKVlV6RVJNQThHQTFVRUNCTUlUbVYzSUZsdmNtc3hGekFWQmdOVkJBb1QKRGsxaGNtbHpkQ0JEYjJ4c1pXZGxNU2t3SndZRFZRUURFeUJtWVdObGJHVmpkQzVqWVhCd2FXNW5MbVZqY213dQpiV0Z5YVhOMExtVmtkVENDQVNJd0RRWUpLb1pJaHZjTkFRRUJCUUFEZ2dFUEFEQ0NBUW9DZ2dFQkFLWmJBMVFCCk1TZ29lU2pFMmE1cXVpT1N6YzV5OE92K1p5MldNUEhWVHFwa25rNkYzQ1A2dUZCVklrRS9yV24xT2lDcUNCaisKdyt5WXhZVjAxZjBVUXJDSTlVTWJ4ZWlWdUhEd1hzanhwNE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mN0Y0tncwpOZ2QxcnVyYlQ5aUFSOU8vbXErWGpjeURXRXBod0pFQlVEdUsrajdXalh3TUc1SllzMllDZExvQXJnYjNOZXFOCkgxSWFVNmhEa3Y0V3hnZzFxNWczNDRBcVI4ZXdsU1M5dk45UXRLRmhyRjRKbnlQaStXQ2NxQ2pUUE5zbVZsYkYKTVYySWZya3ZRTnRFVlpLK3lpME8zSEpDZzRhR3ExdEVETStSTTNjLzNZbHBXcG5Oc2swRGRWeGhXa21TQkt2VgpuekZKZno4ZEFITXArbDRhdlU4MERKaVQxS3djV1VxLzA2Skpudk5yWmI5Vlk5MkdlcWFWWGZsR2NtbkgrdnJFCkNtZng3SENMY2tqWXA4QXZJeXR6YVA0WS9Id2tLelRITElYQTQvd3VaNzI2L0hPLzIwNXkKLS0tLS1FTkQgQ0VSVElGSUNBVEUtLS0tLQo= ------END CERTIFICATE----- +-----END CERTIFICATE----- \ No newline at end of file From 9390c031f6778fc188e02bd8cfc6f3ae25a94917 Mon Sep 17 00:00:00 2001 From: Brendon Kupsch Date: Thu, 5 Dec 2024 00:35:37 -0500 Subject: [PATCH 063/163] removed extra spacing on cert --- backend/2024_InCommonCA.crt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/2024_InCommonCA.crt b/backend/2024_InCommonCA.crt index a127bb7..273f4e3 100644 --- a/backend/2024_InCommonCA.crt +++ b/backend/2024_InCommonCA.crt @@ -90,4 +90,4 @@ Rt0vxuBqw8M0Ayx9lt1awg6nCpnBBYurDC/zXDrPbDdVCYfeU0BsWO/8tqtlbgT2 G9w84FoVxp7Z8VlIMCFlA2zs6SFz7JsDoeA3raAVGI/6ugLOpyypEBMs1OUIJqsi l2D4kF501KKaU73yqWjgom7C12yxow+ev+to51byrvLjKzg6CYG1a4XXvi3tPxq3 smPi9WIsgtRqAEFQ8TmDn5XpNpaYbg== ------END CERTIFICATE----- +-----END CERTIFICATE----- \ No newline at end of file From bea4117542d5d387b500dd41ffa3fef9dc6ab672 Mon Sep 17 00:00:00 2001 From: Brendon Kupsch Date: Thu, 5 Dec 2024 00:38:26 -0500 Subject: [PATCH 064/163] removed idp_cert and updated server.js --- backend/idp_cert.pem | 19 ------------------- server.js | 2 +- 2 files changed, 1 insertion(+), 20 deletions(-) delete mode 100644 backend/idp_cert.pem diff --git a/backend/idp_cert.pem b/backend/idp_cert.pem deleted file mode 100644 index 1408919..0000000 --- a/backend/idp_cert.pem +++ /dev/null @@ -1,19 +0,0 @@ ------BEGIN CERTIFICATE----- -LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSUc0ekNDQlV1Z0F3SUJBZ0lRSkZ2 -cS81N1FQU2pSU2o2cEZhV1pFVEFOQmdrcWhraUc5dzBCQVF3RkFEQkUKTVFzd0NRWURW -UVFHRXdKVlV6RVNNQkFHQTFVRUNoTUpTVzUwWlhKdVpYUXlNU0V3SHdZRFZRUURFeGhK -YmtOdgpiVzF2YmlCU1UwRWdVMlZ5ZG1WeUlFTkJJREl3SGhjTk1qUXhNVEV4TURBd01E -QXdXaGNOTWpVeE1qRXlNak0xCk9UVTVXakJrTVFzd0NRWURWUVFHRXdKVlV6RVJNQThH -QTFVRUNCTUlUbVYzSUZsdmNtc3hGekFWQmdOVkJBb1QKRGsxaGNtbHpkQ0JEYjJ4c1pX -ZGxNU2t3SndZRFZRUURFeUJtWVdObGJHVmpkQzVqWVhCd2FXNW5MbVZqY213dQpiV0Z5 -YVhOMExtVmtkVENDQVNJd0RRWUpLb1pJaHZjTkFRRUJCUUFEZ2dFUEFEQ0NBUW9DZ2dF -QkFLWmJBMVFBCk1TZ29lU2pFMmE1cXVpT1N6YzV5OE92K1p5MldNUEhWVHFwa25rNkYz -Q1A2dUZCVklrRS9yV24xT2lDcUNCaisKdyt5WXhZVjAxZjBVUXJDSTlVTWJ4ZWlWdUhE -d1hzanhwNEoweG5MTU1WQXh4MGlOTWhrY1RSS0dwU3I4MjNoNgpsYUVJTGcxTFRHQlJY -MGg1M3BJUTNSTE42UWZjZk5UanNNZW8veXBnNnJUbUViWXcyT1grRmMybXVVQ01oTTFJ -Ck1VTUJSTkozOTVCaWdBbGlBbmdrQWFST0hNd2lPSXk1NDhyVk02NFliQjhJclNhZFFP -ZzJxWVkylMcVVlNDc1NEaUMzClc0S0RHTXBlZWZETzdHaHc0M0ZmZmtnN2xycE9SRjlk -Qm5INjFKak9oY3EwaTZpeUM3NmRtQ3lLY1A3RUlZdjQKMXpxcU1VMnZwQ3VneVR0bmFP -bzBQUUd0QUFBQUFaTWM2M0oyQUFBRUF3QkdNRVFDSUdSSkhULzBYSnhpSlh1MXoKLS0t -LS1FTkQgQ0VSVElGSUNBVEUtLS0tLQ= ------END CERTIFICATE----- \ No newline at end of file diff --git a/server.js b/server.js index eacd95e..f62f13a 100644 --- a/server.js +++ b/server.js @@ -54,7 +54,7 @@ passport.use(new SamlStrategy( path: '/login/callback', entryPoint: 'https://auth.it.marist.edu/idp/profile/SAML2/Redirect/SSO', issuer: 'https://facelect.capping.ecrl.marist.edu', - cert: fs.readFileSync('./backend/idp_cert.pem', 'utf-8'), + cert: fs.readFileSync('./backend/idp_metadata.xml', 'utf-8'), }, function(profile, done) { console.log('SAML Profile:', profile); From cb0fbd2710e24eeee45758dd084caf9603984079 Mon Sep 17 00:00:00 2001 From: Brendon Kupsch Date: Thu, 5 Dec 2024 00:44:33 -0500 Subject: [PATCH 065/163] added winston (monkey) for logging --- server.js | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/server.js b/server.js index f62f13a..17904a2 100644 --- a/server.js +++ b/server.js @@ -9,9 +9,25 @@ const passport = require('passport'); const SamlStrategy = require('passport-saml').Strategy; const session = require('express-session'); const bodyParser = require("body-parser"); +const winston = require('winston'); const app = express(); +const logger = winston.createLogger({ + level: 'info', + format: winston.format.combine( + winston.format.timestamp(), + winston.format.printf(({ timestamp, level, message }) => { + return `${timestamp} [${level}]: ${message}`; + }) + ), + transports: [ + new winston.transports.Console(), + new winston.transports.File({ filename: 'error.log', level: 'error' }), + new winston.transports.File({ filename: 'combined.log' }) + ] +}); + // List of allowed origins const allowedOrigins = [ 'https://facelect.capping.ecrl.marist.edu', From e5b2f69f30f0a063a7026619917955442f583033 Mon Sep 17 00:00:00 2001 From: Brendon Kupsch Date: Thu, 5 Dec 2024 01:01:26 -0500 Subject: [PATCH 066/163] Removed winston --- server.js | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/server.js b/server.js index 17904a2..f62f13a 100644 --- a/server.js +++ b/server.js @@ -9,25 +9,9 @@ const passport = require('passport'); const SamlStrategy = require('passport-saml').Strategy; const session = require('express-session'); const bodyParser = require("body-parser"); -const winston = require('winston'); const app = express(); -const logger = winston.createLogger({ - level: 'info', - format: winston.format.combine( - winston.format.timestamp(), - winston.format.printf(({ timestamp, level, message }) => { - return `${timestamp} [${level}]: ${message}`; - }) - ), - transports: [ - new winston.transports.Console(), - new winston.transports.File({ filename: 'error.log', level: 'error' }), - new winston.transports.File({ filename: 'combined.log' }) - ] -}); - // List of allowed origins const allowedOrigins = [ 'https://facelect.capping.ecrl.marist.edu', From d5335788065ee07f851bf6416f0a20a913c0c6b5 Mon Sep 17 00:00:00 2001 From: Brendon Kupsch Date: Thu, 5 Dec 2024 01:05:03 -0500 Subject: [PATCH 067/163] removed RSA from key header and footer --- backend/facelect.capping.ecrl.marist.edu.key | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/backend/facelect.capping.ecrl.marist.edu.key b/backend/facelect.capping.ecrl.marist.edu.key index f537640..3870484 100644 --- a/backend/facelect.capping.ecrl.marist.edu.key +++ b/backend/facelect.capping.ecrl.marist.edu.key @@ -1,4 +1,4 @@ ------BEGIN RSA PRIVATE KEY----- +-----BEGIN PRIVATE KEY----- MIIEpAIBAAKCAQEAplsDVAExKCh5KMTZrmq6I5LNznLw6/5nLZYw8dVOqmSeToXc I/q4UFUiQT+tafU6IKoIGP7D7JjFhXTV/RRCsIj1QxvF6JW4cPBeyPGngnTGcswx UDHHSI0yGRxNEoalKvzbeHqVoQguDUtMYFFfSHnekhDdEs3pB9x81OOwx6j/KmDq @@ -24,4 +24,4 @@ WzMlLOP4j6bhgGTz6HZA/6YaJeekQo2g8o9FRlgJA/SdJJEnSRQ8J3DePVLUjsmt QGoqDwKBgQC5JzmlXPWm63P32GnBPCp5EZuuestWfctNwqMfQfRWOUBTMzXmBTCs l7qZ4BjfCecA07ksmbamtGXasm7S3TupACZdi2MhGZ+Yb3DJWr2o46i9AQuKBqJ1 nB0U5vVwdgYTBavIozEOts/UeyZmLw2S1mQADC/6m3HLDcD6by8qTQ== ------END RSA PRIVATE KEY----- \ No newline at end of file +-----END PRIVATE KEY----- \ No newline at end of file From 84ae4ea1789d8b9ee8b2b8d1d6141b6e1e7658af Mon Sep 17 00:00:00 2001 From: Brendon Kupsch Date: Thu, 5 Dec 2024 01:06:44 -0500 Subject: [PATCH 068/163] Revert "removed RSA from key header and footer" This reverts commit d5335788065ee07f851bf6416f0a20a913c0c6b5. --- backend/facelect.capping.ecrl.marist.edu.key | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/backend/facelect.capping.ecrl.marist.edu.key b/backend/facelect.capping.ecrl.marist.edu.key index 3870484..f537640 100644 --- a/backend/facelect.capping.ecrl.marist.edu.key +++ b/backend/facelect.capping.ecrl.marist.edu.key @@ -1,4 +1,4 @@ ------BEGIN PRIVATE KEY----- +-----BEGIN RSA PRIVATE KEY----- MIIEpAIBAAKCAQEAplsDVAExKCh5KMTZrmq6I5LNznLw6/5nLZYw8dVOqmSeToXc I/q4UFUiQT+tafU6IKoIGP7D7JjFhXTV/RRCsIj1QxvF6JW4cPBeyPGngnTGcswx UDHHSI0yGRxNEoalKvzbeHqVoQguDUtMYFFfSHnekhDdEs3pB9x81OOwx6j/KmDq @@ -24,4 +24,4 @@ WzMlLOP4j6bhgGTz6HZA/6YaJeekQo2g8o9FRlgJA/SdJJEnSRQ8J3DePVLUjsmt QGoqDwKBgQC5JzmlXPWm63P32GnBPCp5EZuuestWfctNwqMfQfRWOUBTMzXmBTCs l7qZ4BjfCecA07ksmbamtGXasm7S3TupACZdi2MhGZ+Yb3DJWr2o46i9AQuKBqJ1 nB0U5vVwdgYTBavIozEOts/UeyZmLw2S1mQADC/6m3HLDcD6by8qTQ== ------END PRIVATE KEY----- \ No newline at end of file +-----END RSA PRIVATE KEY----- \ No newline at end of file From 1dd1eaa3fe2e5cf41f0f4c2ed18388e6948e2825 Mon Sep 17 00:00:00 2001 From: Brendon Kupsch Date: Thu, 5 Dec 2024 01:14:09 -0500 Subject: [PATCH 069/163] updated package.json --- package.json | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index 5634a17..d3e1700 100644 --- a/package.json +++ b/package.json @@ -13,11 +13,14 @@ "ag-grid": "^18.1.2", "ag-grid-react": "^32.2.2", "bcryptjs": "^2.4.3", + "body-parser": "^1.20.2", "concurrently": "^9.0.1", "cors": "^2.8.5", "crypto": "^1.0.1", "dotenv": "^16.4.5", + "express": "^4.18.2", "express-session": "^1.18.1", + "fs": "^0.0.1-security", "passport": "^0.7.0", "passport-saml": "^3.2.4", "pg": "^8.13.0", @@ -53,4 +56,4 @@ "last 1 safari version" ] } -} +} \ No newline at end of file From 5b4c08dd087862c11d452e4fd1ed697e6acec7ec Mon Sep 17 00:00:00 2001 From: Brendon Kupsch Date: Thu, 5 Dec 2024 01:40:26 -0500 Subject: [PATCH 070/163] edited server.js bodyparser --- server.js | 2 -- 1 file changed, 2 deletions(-) diff --git a/server.js b/server.js index f62f13a..b8c3463 100644 --- a/server.js +++ b/server.js @@ -8,7 +8,6 @@ const fs = require('fs'); const passport = require('passport'); const SamlStrategy = require('passport-saml').Strategy; const session = require('express-session'); -const bodyParser = require("body-parser"); const app = express(); @@ -135,7 +134,6 @@ app.get('/faculty', async (req, res) => { // SSO callback route app.post('/login/callback', - bodyParser.urlencoded({ extended: false }), passport.authenticate('saml', { failureRedirect: '/login', failureFlash: true From e5210ccacb02e4b6255d4ab293964eb9ef98e68a Mon Sep 17 00:00:00 2001 From: Brendon Kupsch <98063893+BrendonKupsch1@users.noreply.github.com> Date: Thu, 5 Dec 2024 16:15:40 -0500 Subject: [PATCH 071/163] Added idp cert and updated passport saml --- backend/idp_cert.crt | 21 +++++++++++++++++++++ server.js | 2 +- 2 files changed, 22 insertions(+), 1 deletion(-) create mode 100644 backend/idp_cert.crt diff --git a/backend/idp_cert.crt b/backend/idp_cert.crt new file mode 100644 index 0000000..b0a4652 --- /dev/null +++ b/backend/idp_cert.crt @@ -0,0 +1,21 @@ +-----BEGIN CERTIFICATE----- +MIIDZDCCAkygAwIBAgIEWUPr+jANBgkqhkiG9w0BAQsFADB0MQswCQYDVQQGEwJV +UzELMAkGA1UECAwCTlkxFTATBgNVBAcMDFBvdWdoa2VlcHNpZTEXMBUGA1UECgwO +TWFyaXN0IENvbGxlZ2UxCzAJBgNVBAsMAklUMRswGQYDVQQDDBJhdXRoLml0Lm1h +cmlzdC5lZHUwHhcNMTcwNjE2MTQzNDIzWhcNMjcwNjE2MTQzNDIzWjB0MQswCQYD +VQQGEwJVUzELMAkGA1UECAwCTlkxFTATBgNVBAcMDFBvdWdoa2VlcHNpZTEXMBUG +A1UECgwOTWFyaXN0IENvbGxlZ2UxCzAJBgNVBAsMAklUMRswGQYDVQQDDBJhdXRo +Lml0Lm1hcmlzdC5lZHUwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDE +43jyxC++dV0lYffBNFiMiSALRzZQIKRGGybuLobzyN7/ItAex9ABY36IKPQ7OPPt +sKofjX4VLcVpehiDAUeQpLOUIOWiEJ3+QBR7WPqGRLW2Hen3utApH1a1+iA5nzqE +uhpu0SMqC1g9Rt5m0ZGAuK+jT4KWfaEe18yphF8szpcVzwfAACr8cbYGSobMbOsz +DgcQnXS+m1qorsn7fLZOa6R4pve/G9YZunFAJXBdmkHGo8Rmd6s/kIgQJZIksqkZ +50gpDqzbIlKRYfHGroztjdGWcXkHUL7UXjUCNbQOvIvml4D8s2JtwgFRwkvo8BJ5 +KCKjJZQi9GZ3SRs4zyabAgMBAAEwDQYJKoZIhvcNAQELBQADggEBAC+wiZCUiTlL +MjNPACIe7f2wz5oit+HYRx3jTVTtWX8t+dWlEMK94LNysPuuU110qy0VeBIPgXXz +Izka8yTOhxbBkQWG/5t7bAygOHhcyd6/XOv8pcwd1K+XMfu/BwLgyqk3pasERPu3 +hClNTmEyAkH1r09+k2TJpXqwA1UU6UGtHSqEwQz+FmNzCvEsyCI9i+cN4sVR9Lme +ifZK7NdEDPu3jCiJgrZ0M6ltHkIf6yYm8xOv/6Ujcfvktofqe7oaqLYwAU1gQ2bC +DkFRqL4im1iI7aKFrOoW9f5NF4Fx4aa9KidDmoSUOUSf42K4qGPZdvGpeRCxz/9q +0HSCaQodCfM= +-----END CERTIFICATE----- \ No newline at end of file diff --git a/server.js b/server.js index b8c3463..03751ce 100644 --- a/server.js +++ b/server.js @@ -53,7 +53,7 @@ passport.use(new SamlStrategy( path: '/login/callback', entryPoint: 'https://auth.it.marist.edu/idp/profile/SAML2/Redirect/SSO', issuer: 'https://facelect.capping.ecrl.marist.edu', - cert: fs.readFileSync('./backend/idp_metadata.xml', 'utf-8'), + cert: fs.readFileSync('./backend/idp_cert.pem', 'utf-8'), }, function(profile, done) { console.log('SAML Profile:', profile); From cac68ee624abe8e44f79bfbd03eb75060396d5a6 Mon Sep 17 00:00:00 2001 From: Brendon Kupsch Date: Thu, 5 Dec 2024 16:21:58 -0500 Subject: [PATCH 072/163] created idp_cert.pem --- backend/idp_cert.pem | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 backend/idp_cert.pem diff --git a/backend/idp_cert.pem b/backend/idp_cert.pem new file mode 100644 index 0000000..b0a4652 --- /dev/null +++ b/backend/idp_cert.pem @@ -0,0 +1,21 @@ +-----BEGIN CERTIFICATE----- +MIIDZDCCAkygAwIBAgIEWUPr+jANBgkqhkiG9w0BAQsFADB0MQswCQYD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9f5NF4Fx4aa9KidDmoSUOUSf42K4qGPZdvGpeRCxz/9q +0HSCaQodCfM= +-----END CERTIFICATE----- \ No newline at end of file From f777493ef8536480537e2171cbd977b2ffa588b0 Mon Sep 17 00:00:00 2001 From: Brendon Kupsch <98063893+BrendonKupsch1@users.noreply.github.com> Date: Thu, 5 Dec 2024 16:24:22 -0500 Subject: [PATCH 073/163] Update readme --- backend/readme | 2 ++ 1 file changed, 2 insertions(+) diff --git a/backend/readme b/backend/readme index 1a27036..d17dfc6 100644 --- a/backend/readme +++ b/backend/readme @@ -3,4 +3,6 @@ Instructions for VM: Shibboleth files are located in /etc/shibboleth - The main config file is shibboleth.xml +Apache files are located in /etc/apache2 + Server files are located on the vm at /var/www/html \ No newline at end of file From 5fc164c6aba7dca8cc55cfd745e3e1c4332ee243 Mon Sep 17 00:00:00 2001 From: Brendon Kupsch Date: Thu, 5 Dec 2024 21:52:00 -0500 Subject: [PATCH 074/163] Cleaning server.js and trying to generate new metadata --- server.js | 56 +++++++++++++++++++++++++++++++++---------------------- 1 file changed, 34 insertions(+), 22 deletions(-) diff --git a/server.js b/server.js index 03751ce..e2d4a3e 100644 --- a/server.js +++ b/server.js @@ -14,10 +14,7 @@ const app = express(); // List of allowed origins const allowedOrigins = [ 'https://facelect.capping.ecrl.marist.edu', - 'https://auth.it.marist.edu/idp', 'https://api-a1cc77df.duosecurity.com', - 'https://facelect.capping.ecrl.marist.edu:3001/login/callback', - '*', 'https://auth.it.marist.edu', ]; @@ -27,7 +24,7 @@ app.use(express.json()); // Parse incoming JSON data // Configure session middleware app.use(session({ - secret: 'your-secret-key', // Replace with a strong secret key + secret: 'Faculty%Defeat$248902', // Replace with a strong secret key resave: false, saveUninitialized: true, cookie: { secure: process.env.NODE_ENV === 'production' } // Ensure cookies are only used over HTTPS in production @@ -45,15 +42,20 @@ const hashPassword = (password) => { return crypto.createHash('sha256').update(password).digest('hex'); }; +var spKey = fs.readFileSync('./backend/facelect.capping.ecrl.marist.edu.key', 'utf-8'); +var spCert = fs.readFileSync('./backend/2024_facelect.capping.ecrl.marist.edu.crt', 'utf-8'); +var idpCert = fs.readFileSync('./backend/idp_cert.pem', 'utf-8'); + // Passport SAML strategy configuration passport.use(new SamlStrategy( { // Explicitly define the Assertion Consumer Service URL - callbackUrl: 'http://facelect.capping.ecrl.marist.edu:3001/login/callback', + callbackUrl: 'https://facelect.capping.ecrl.marist.edulogin/callback', path: '/login/callback', entryPoint: 'https://auth.it.marist.edu/idp/profile/SAML2/Redirect/SSO', issuer: 'https://facelect.capping.ecrl.marist.edu', - cert: fs.readFileSync('./backend/idp_cert.pem', 'utf-8'), + decryptionPvk: spKey, + cert: idpCert, }, function(profile, done) { console.log('SAML Profile:', profile); @@ -75,10 +77,35 @@ passport.deserializeUser((user, done) => { done(null, user); }); +passport.use('saml', SamlStrategy); + +// SSO callback route +app.post('/login/callback', + passport.authenticate('saml', { + failureRedirect: '/login', + failureFlash: true +}), (req, res) => { + res.redirect('/user-profile'); +}); + +// SSO login route +app.get('/sso/login', passport.authenticate('saml', { + successRedirect: '/user-profile', + failureRedirect: '/login' +})); + // Route to serve SP metadata +const metadata = SamlStrategy.samlgenerateServiceProviderMetadata({ + cert: spCert, + key: spKey, + issuer: 'https://facelect.capping.ecrl.marist.edu', + callbackUrl: 'https://facelect.capping.ecrl.marist.edu/login/callback', +}); + app.get('/metadata', (req, res) => { + const decryptionCert = spCert; res.type('application/xml'); - res.status(200).send(samlStrategy.generateServiceProviderMetadata(fs.readFileSync('./backend/2024_facelect.capping.ecrl.marist.edu.crt', 'utf-8'))); + res.send (metadata) }); // Route to handle admin login @@ -132,21 +159,6 @@ app.get('/faculty', async (req, res) => { } }); -// SSO callback route -app.post('/login/callback', - passport.authenticate('saml', { - failureRedirect: '/login', - failureFlash: true -}), (req, res) => { - res.redirect('/user-profile'); -}); - -// SSO login route -app.get('/sso/login', passport.authenticate('saml', { - successRedirect: '/user-profile', - failureRedirect: '/login' -})); - // Read SSL certificate and key const options = { key: fs.readFileSync('./backend/facelect.capping.ecrl.marist.edu.key'), From 919c7fecfd69f5bf589c3d305885317469b005e3 Mon Sep 17 00:00:00 2001 From: Brendon Kupsch Date: Thu, 5 Dec 2024 21:56:28 -0500 Subject: [PATCH 075/163] fixed typo --- server.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server.js b/server.js index e2d4a3e..6e70fb3 100644 --- a/server.js +++ b/server.js @@ -95,7 +95,7 @@ app.get('/sso/login', passport.authenticate('saml', { })); // Route to serve SP metadata -const metadata = SamlStrategy.samlgenerateServiceProviderMetadata({ +const metadata = SamlStrategy.generateServiceProviderMetadata({ cert: spCert, key: spKey, issuer: 'https://facelect.capping.ecrl.marist.edu', From 597206a062be51af59f8c5f0331ec0c7130c460c Mon Sep 17 00:00:00 2001 From: Brendon Kupsch Date: Thu, 5 Dec 2024 22:02:23 -0500 Subject: [PATCH 076/163] attempting to generate metadata --- server.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/server.js b/server.js index 6e70fb3..ffc8ba7 100644 --- a/server.js +++ b/server.js @@ -8,6 +8,7 @@ const fs = require('fs'); const passport = require('passport'); const SamlStrategy = require('passport-saml').Strategy; const session = require('express-session'); +const bodyParser = require("body-parser"); const app = express(); @@ -80,7 +81,8 @@ passport.deserializeUser((user, done) => { passport.use('saml', SamlStrategy); // SSO callback route -app.post('/login/callback', +app.post('/login/callback', + bodyParser.urlencoded({ extended: false }), passport.authenticate('saml', { failureRedirect: '/login', failureFlash: true @@ -96,8 +98,7 @@ app.get('/sso/login', passport.authenticate('saml', { // Route to serve SP metadata const metadata = SamlStrategy.generateServiceProviderMetadata({ - cert: spCert, - key: spKey, + decryptionCert: spCert, issuer: 'https://facelect.capping.ecrl.marist.edu', callbackUrl: 'https://facelect.capping.ecrl.marist.edu/login/callback', }); From 75170e77880ef9d737e08288bba3ba5061487714 Mon Sep 17 00:00:00 2001 From: Brendon Kupsch Date: Thu, 5 Dec 2024 22:10:48 -0500 Subject: [PATCH 077/163] saml strategy change may need to be reverted --- server.js | 27 ++++++++------------------- 1 file changed, 8 insertions(+), 19 deletions(-) diff --git a/server.js b/server.js index ffc8ba7..5a76753 100644 --- a/server.js +++ b/server.js @@ -48,7 +48,7 @@ var spCert = fs.readFileSync('./backend/2024_facelect.capping.ecrl.marist.edu.cr var idpCert = fs.readFileSync('./backend/idp_cert.pem', 'utf-8'); // Passport SAML strategy configuration -passport.use(new SamlStrategy( +const samlStrategy = new SamlStrategy( { // Explicitly define the Assertion Consumer Service URL callbackUrl: 'https://facelect.capping.ecrl.marist.edulogin/callback', @@ -58,17 +58,10 @@ passport.use(new SamlStrategy( decryptionPvk: spKey, cert: idpCert, }, - function(profile, done) { - console.log('SAML Profile:', profile); - findByEmail(profile.email, (err, user) => { - if (err) { - console.error('Error in SAML callback:', err); - return done(err); - } - return done(null, user); - }); - } -)); + (profile, done) => { + return done(null, profile); + } +); passport.serializeUser((user, done) => { done(null, user); @@ -78,7 +71,7 @@ passport.deserializeUser((user, done) => { done(null, user); }); -passport.use('saml', SamlStrategy); +passport.use('saml', samlStrategy); // SSO callback route app.post('/login/callback', @@ -97,17 +90,13 @@ app.get('/sso/login', passport.authenticate('saml', { })); // Route to serve SP metadata -const metadata = SamlStrategy.generateServiceProviderMetadata({ +const metadata = samlStrategy.generateServiceProviderMetadata({ decryptionCert: spCert, issuer: 'https://facelect.capping.ecrl.marist.edu', callbackUrl: 'https://facelect.capping.ecrl.marist.edu/login/callback', }); -app.get('/metadata', (req, res) => { - const decryptionCert = spCert; - res.type('application/xml'); - res.send (metadata) -}); +console.log(metadata); // Route to handle admin login app.post('/admin-login', async (req, res) => { From 0e954510d222ea04a09e5bc375bf6afeaf28a7a8 Mon Sep 17 00:00:00 2001 From: Brendon Kupsch Date: Thu, 5 Dec 2024 22:14:13 -0500 Subject: [PATCH 078/163] updated error --- server.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server.js b/server.js index 5a76753..420a838 100644 --- a/server.js +++ b/server.js @@ -91,7 +91,7 @@ app.get('/sso/login', passport.authenticate('saml', { // Route to serve SP metadata const metadata = samlStrategy.generateServiceProviderMetadata({ - decryptionCert: spCert, + decryptionCert: fs.readFileSync('./backend/2024_facelect.capping.ecrl.marist.edu.crt', 'utf-8'), issuer: 'https://facelect.capping.ecrl.marist.edu', callbackUrl: 'https://facelect.capping.ecrl.marist.edu/login/callback', }); From d76b3f40f6fc05076a29b7c0599b32644591950f Mon Sep 17 00:00:00 2001 From: Brendon Kupsch Date: Thu, 5 Dec 2024 22:21:43 -0500 Subject: [PATCH 079/163] remoted var for certs and keys --- server.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/server.js b/server.js index 420a838..f86120c 100644 --- a/server.js +++ b/server.js @@ -55,8 +55,8 @@ const samlStrategy = new SamlStrategy( path: '/login/callback', entryPoint: 'https://auth.it.marist.edu/idp/profile/SAML2/Redirect/SSO', issuer: 'https://facelect.capping.ecrl.marist.edu', - decryptionPvk: spKey, - cert: idpCert, + decryptionPvk: fs.readFileSync('./backend/facelect.capping.ecrl.marist.edu.key', 'utf-8'), + cert: fs.readFileSync('./backend/idp_cert.pem', 'utf-8'), }, (profile, done) => { return done(null, profile); @@ -91,7 +91,7 @@ app.get('/sso/login', passport.authenticate('saml', { // Route to serve SP metadata const metadata = samlStrategy.generateServiceProviderMetadata({ - decryptionCert: fs.readFileSync('./backend/2024_facelect.capping.ecrl.marist.edu.crt', 'utf-8'), + decryptionCert: '-----BEGIN CERTIFICATE-----MIIG4zCCBUugAwIBAgIQJFvq/57QPSjRSj6pFaWZETANBgkqhkiG9w0BAQwFADBEMQswCQYDVQQGEwJVUzESMBAGA1UEChMJSW50ZXJuZXQyMSEwHwYDVQQDExhJbkNvbW1vbiBSU0EgU2VydmVyIENBIDIwHhcNMjQxMTExMDAwMDAwWhcNMjUxMjEyMjM1OTU5WjBkMQswCQYDVQQGEwJVUzERMA8GA1UECBMITmV3IFlvcmsxFzAVBgN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.edu', callbackUrl: 'https://facelect.capping.ecrl.marist.edu/login/callback', }); From d9f99ae46a932135378ac187bab6ab8fb6db193d Mon Sep 17 00:00:00 2001 From: Brendon Kupsch Date: Thu, 5 Dec 2024 22:31:02 -0500 Subject: [PATCH 080/163] updated metadata generator --- server.js | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/server.js b/server.js index f86120c..54a30a1 100644 --- a/server.js +++ b/server.js @@ -46,6 +46,7 @@ const hashPassword = (password) => { var spKey = fs.readFileSync('./backend/facelect.capping.ecrl.marist.edu.key', 'utf-8'); var spCert = fs.readFileSync('./backend/2024_facelect.capping.ecrl.marist.edu.crt', 'utf-8'); var idpCert = fs.readFileSync('./backend/idp_cert.pem', 'utf-8'); +var rootCert = fs.readFileSync('./backend/2024_InCommonCA.crt', 'utf-8'); // Passport SAML strategy configuration const samlStrategy = new SamlStrategy( @@ -89,13 +90,8 @@ app.get('/sso/login', passport.authenticate('saml', { failureRedirect: '/login' })); -// Route to serve SP metadata -const metadata = samlStrategy.generateServiceProviderMetadata({ - decryptionCert: '-----BEGIN CERTIFICATE-----MIIG4zCCBUugAwIBAgIQJFvq/57QPSjRSj6pFaWZETANBgkqhkiG9w0BAQwFADBEMQswCQYDVQQGEwJVUzESMBAGA1UEChMJSW50ZXJuZXQyMSEwHwYDVQQDExhJbkNvbW1vbiBSU0EgU2VydmVyIENBIDIwHhcNMjQxMTExMDAwMDAwWhcNMjUxMjEyMjM1OTU5WjBkMQswCQYDVQQGEwJVUzERMA8GA1UECBMITmV3IFlvcmsxFzAVBgNVBAoTDk1hcmlzdCBDb2xsZWdlMSkwJwYDVQQDEyBmYWNlbGVjdC5jYXBwaW5nLmVjcmwubWFyaXN0LmVkdTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAKZbA1QBMSgoeSjE2a5quiOSzc5y8Ov+Zy2WMPHVTqpknk6F3CP6uFBVIkE/rWn1OiCqCBj+w+yYxYV01f0UQrCI9UMbxeiVuH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/kwNsAAAAZMc63J2AAAEAwBGMEQCIGRJHT/0XJxiJXu1z6KCFOdnK8eS5kSwi/3d/IVKGUedAiATsfSGqAVTssSdWz+6F1P0mOkG7GbcrNBLHmJdJGwFAAB2ABLxTjS9U3JMhAYZw48/ehP457Vih4icbTAFhOvlhiY6AAABkxzrckIAAAQDAEcwRQIgJ4vy3g0ADCCbtYL0zbkMBehcZgjID+gLqvjMKstma44CIQDwc7zaBz206ABevp8Xiky4RA1JpeQFf7ABS1rgW2BlUDANBgkqhkiG9w0BAQwFAAOCAYEAX4dmExVu1bPLmHP0BmfVRsLV6ckbYJZM2DTnG/KhexGRhjtS5nESttDoYv/tMROHLyC3+wLpgNc7PMRMt6u+H7Ox5HxDZnaffuztUirSjzKty90E6zYqA14T3xmh2pdOw0sXzGUjUyOLNpgOdc2k7y60mNDrX6Qjo6+AqoTM6idxDZcZsKLY7nzIJYjTDSqRAmeUkJctcKgsNgd1rurbT9iAR9O/mq+XjcyDWEphwJEBUDuK+j7WjXwMG5JYs2YCdLoArgb3NeqNH1IaU6hDkv4Wxgg1q5g344AqR8ewlSS9vN9QtKFhrF4JnyPi+WCcqCjTPNsmVlbFMV2IfrkvQNtEVZK+yi0O3HJCg4aGq1tEDM+RM3c/3YlpWpnNsk0DdVxhWkmSBKvVnzFJfz8dAHMp+l4avU80DJiT1KwcWUq/06JJnvNrZb9VY92GeqaVXflGcmnH+vrECmfx7HCLckjYp8AvIytzaP4Y/HwkKzTHLIXA4/wuZ726/HO/205y-----END CERTIFICATE-----', - issuer: 'https://facelect.capping.ecrl.marist.edu', - callbackUrl: 'https://facelect.capping.ecrl.marist.edu/login/callback', -}); - +// Log SP metadata +const metadata = samlStrategy.generateServiceProviderMetadata(spCert); console.log(metadata); // Route to handle admin login From 7369ebd09caf702fbeac5da102faf21006e514a7 Mon Sep 17 00:00:00 2001 From: Brendon Kupsch Date: Thu, 5 Dec 2024 22:48:21 -0500 Subject: [PATCH 081/163] added sp metadata file and reverted callback url --- backend/sp_metadata.xml | 55 +++++++++++++++++++++++++++++++++++++++++ server.js | 3 +-- 2 files changed, 56 insertions(+), 2 deletions(-) create mode 100644 backend/sp_metadata.xml diff --git a/backend/sp_metadata.xml b/backend/sp_metadata.xml new file mode 100644 index 0000000..e8dd328 --- /dev/null +++ b/backend/sp_metadata.xml @@ -0,0 +1,55 @@ +[1] +[1] +[1] +[1] +[1] +[1] +[1] MIIG4zCCBUugAwIBAgIQJFvq/57QPSjRSj6pFaWZETANBgkqhkiG9w0BAQwFADBE +[1] MQswCQYDVQQGEwJVUzESMBAGA1UEChMJSW50ZXJuZXQyMSEwHwYDVQQDExhJbkNv +[1] bW1vbiBSU0EgU2VydmVyIENBIDIwHhcNMjQxMTExMDAwMDAwWhcNMjUxMjEyMjM1 +[1] OTU5WjBkMQswCQYDVQQGEwJVUzERMA8GA1UECBMITmV3IFlvcmsxFzAVBgNVBAoT +[1] Dk1hcmlzdCBDb2xsZWdlMSkwJwYDVQQDEyBmYWNlbGVjdC5jYXBwaW5nLmVjcmwu +[1] bWFyaXN0LmVkdTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAKZbA1QB +[1] MSgoeSjE2a5quiOSzc5y8Ov+Zy2WMPHVTqpknk6F3CP6uFBVIkE/rWn1OiCqCBj+ +[1] w+yYxYV01f0UQrCI9UMbxeiVuHDwXsjxp4J0xnLMMVAxx0iNMhkcTRKGpSr823h6 +[1] laEILg1LTGBRX0h53pIQ3RLN6QfcfNTjsMeo/ypg6rTmEbYw2OX+Fc2muUCMhM1I +[1] uSBrK+95BigAliAngkAaROHMwiOIy548rVM64YbB8IrSadQOg2qYY2+LqUe47v5I +[1] pr9HB1x/n3wegpgm4rumx58Nd1y3AA/r3Lah5aAmL7WmtcQPFu7HTlt3RbOTF5Jn +[1] evxj/JqPeH7ryMUCAwEAAaOCAy8wggMrMB8GA1UdIwQYMBaAFO9MAJKm+3YuXpXi +[1] yV+HGxnVTeLZMB0GA1UdDgQWBBRnKtAmn3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eQFf7ABS1rgW2BlUDANBgkqhkiG9w0BAQwFAAOCAYEAX4dmExVu1bPL +[1] mHP0BmfVRsLV6ckbYJZM2DTnG/KhexGRhjtS5nESttDoYv/tMROHLyC3+wLpgNc7 +[1] PMRMt6u+H7Ox5HxDZnaffuztUirSjzKty90E6zYqA14T3xmh2pdOw0sXzGUjUyOL +[1] NpgOdc2k7y60mNDrX6Qjo6+AqoTM6idxDZcZsKLY7nzIJYjTDSqRAmeUkJctcKgs +[1] Ngd1rurbT9iAR9O/mq+XjcyDWEphwJEBUDuK+j7WjXwMG5JYs2YCdLoArgb3NeqN +[1] H1IaU6hDkv4Wxgg1q5g344AqR8ewlSS9vN9QtKFhrF4JnyPi+WCcqCjTPNsmVlbF +[1] MV2IfrkvQNtEVZK+yi0O3HJCg4aGq1tEDM+RM3c/3YlpWpnNsk0DdVxhWkmSBKvV +[1] nzFJfz8dAHMp+l4avU80DJiT1KwcWUq/06JJnvNrZb9VY92GeqaVXflGcmnH+vrE +[1] Cmfx7HCLckjYp8AvIytzaP4Y/HwkKzTHLIXA4/wuZ726/HO/205y +[1] +[1] +[1] +[1] +[1] +[1] +[1] +[1] +[1] urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress +[1] +[1] +[1] \ No newline at end of file diff --git a/server.js b/server.js index 54a30a1..b2bbaf7 100644 --- a/server.js +++ b/server.js @@ -51,8 +51,7 @@ var rootCert = fs.readFileSync('./backend/2024_InCommonCA.crt', 'utf-8'); // Passport SAML strategy configuration const samlStrategy = new SamlStrategy( { - // Explicitly define the Assertion Consumer Service URL - callbackUrl: 'https://facelect.capping.ecrl.marist.edulogin/callback', + callbackUrl: 'https://facelect.capping.ecrl.marist.edu:3001/login/callback', path: '/login/callback', entryPoint: 'https://auth.it.marist.edu/idp/profile/SAML2/Redirect/SSO', issuer: 'https://facelect.capping.ecrl.marist.edu', From 7a1d6c60147a38917079e7b1e509af4cdf11084f Mon Sep 17 00:00:00 2001 From: Brendon Kupsch Date: Thu, 5 Dec 2024 22:49:02 -0500 Subject: [PATCH 082/163] commented out log --- server.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/server.js b/server.js index b2bbaf7..2d9641d 100644 --- a/server.js +++ b/server.js @@ -91,7 +91,8 @@ app.get('/sso/login', passport.authenticate('saml', { // Log SP metadata const metadata = samlStrategy.generateServiceProviderMetadata(spCert); -console.log(metadata); +// uncomment below to log metadata +//console.log(metadata); // Route to handle admin login app.post('/admin-login', async (req, res) => { From 5d022f4e0d9231c008e5c2959c5c341964830a89 Mon Sep 17 00:00:00 2001 From: Brendon Kupsch Date: Thu, 5 Dec 2024 22:52:31 -0500 Subject: [PATCH 083/163] commented out saml changes --- server.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/server.js b/server.js index 2d9641d..7d77269 100644 --- a/server.js +++ b/server.js @@ -51,11 +51,13 @@ var rootCert = fs.readFileSync('./backend/2024_InCommonCA.crt', 'utf-8'); // Passport SAML strategy configuration const samlStrategy = new SamlStrategy( { + // remove :3001 from callbackUrl after new import callbackUrl: 'https://facelect.capping.ecrl.marist.edu:3001/login/callback', path: '/login/callback', entryPoint: 'https://auth.it.marist.edu/idp/profile/SAML2/Redirect/SSO', issuer: 'https://facelect.capping.ecrl.marist.edu', - decryptionPvk: fs.readFileSync('./backend/facelect.capping.ecrl.marist.edu.key', 'utf-8'), + // add decryptionPvk back after new import + // decryptionPvk: fs.readFileSync('./backend/facelect.capping.ecrl.marist.edu.key', 'utf-8'), cert: fs.readFileSync('./backend/idp_cert.pem', 'utf-8'), }, (profile, done) => { From a01145179687a1a3a85b7a94971299859522eaa0 Mon Sep 17 00:00:00 2001 From: Brendon Kupsch Date: Thu, 5 Dec 2024 22:58:32 -0500 Subject: [PATCH 084/163] undid passport saml changes for metadata --- server.js | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/server.js b/server.js index 7d77269..acacd11 100644 --- a/server.js +++ b/server.js @@ -49,7 +49,7 @@ var idpCert = fs.readFileSync('./backend/idp_cert.pem', 'utf-8'); var rootCert = fs.readFileSync('./backend/2024_InCommonCA.crt', 'utf-8'); // Passport SAML strategy configuration -const samlStrategy = new SamlStrategy( +passport.use(new SamlStrategy( { // remove :3001 from callbackUrl after new import callbackUrl: 'https://facelect.capping.ecrl.marist.edu:3001/login/callback', @@ -60,10 +60,17 @@ const samlStrategy = new SamlStrategy( // decryptionPvk: fs.readFileSync('./backend/facelect.capping.ecrl.marist.edu.key', 'utf-8'), cert: fs.readFileSync('./backend/idp_cert.pem', 'utf-8'), }, - (profile, done) => { - return done(null, profile); - } -); + function(profile, done) { + console.log('SAML Profile:', profile); + findByEmail(profile.email, (err, user) => { + if (err) { + console.error('Error in SAML callback:', err); + return done(err); + } + return done(null, user); + }); + } +)); passport.serializeUser((user, done) => { done(null, user); @@ -73,8 +80,6 @@ passport.deserializeUser((user, done) => { done(null, user); }); -passport.use('saml', samlStrategy); - // SSO callback route app.post('/login/callback', bodyParser.urlencoded({ extended: false }), @@ -91,11 +96,6 @@ app.get('/sso/login', passport.authenticate('saml', { failureRedirect: '/login' })); -// Log SP metadata -const metadata = samlStrategy.generateServiceProviderMetadata(spCert); -// uncomment below to log metadata -//console.log(metadata); - // Route to handle admin login app.post('/admin-login', async (req, res) => { const { username, password } = req.body; // Capture username and password from request From 7ed6dd8a8c407ab9b494b92b735110aac42f9bac Mon Sep 17 00:00:00 2001 From: Brendon Kupsch Date: Thu, 5 Dec 2024 23:02:19 -0500 Subject: [PATCH 085/163] trying to get back to idp login --- server.js | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/server.js b/server.js index acacd11..f1223da 100644 --- a/server.js +++ b/server.js @@ -25,7 +25,8 @@ app.use(express.json()); // Parse incoming JSON data // Configure session middleware app.use(session({ - secret: 'Faculty%Defeat$248902', // Replace with a strong secret key + // secret: 'Faculty%Defeat$248902', + secret: 'your-secret-key', resave: false, saveUninitialized: true, cookie: { secure: process.env.NODE_ENV === 'production' } // Ensure cookies are only used over HTTPS in production @@ -43,11 +44,6 @@ const hashPassword = (password) => { return crypto.createHash('sha256').update(password).digest('hex'); }; -var spKey = fs.readFileSync('./backend/facelect.capping.ecrl.marist.edu.key', 'utf-8'); -var spCert = fs.readFileSync('./backend/2024_facelect.capping.ecrl.marist.edu.crt', 'utf-8'); -var idpCert = fs.readFileSync('./backend/idp_cert.pem', 'utf-8'); -var rootCert = fs.readFileSync('./backend/2024_InCommonCA.crt', 'utf-8'); - // Passport SAML strategy configuration passport.use(new SamlStrategy( { From 702337228d84162ff4b5b35d4345a1024569877a Mon Sep 17 00:00:00 2001 From: Brendon Kupsch Date: Thu, 5 Dec 2024 23:04:16 -0500 Subject: [PATCH 086/163] trying to get back to idp login --- server.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/server.js b/server.js index f1223da..bdca1a1 100644 --- a/server.js +++ b/server.js @@ -54,7 +54,8 @@ passport.use(new SamlStrategy( issuer: 'https://facelect.capping.ecrl.marist.edu', // add decryptionPvk back after new import // decryptionPvk: fs.readFileSync('./backend/facelect.capping.ecrl.marist.edu.key', 'utf-8'), - cert: fs.readFileSync('./backend/idp_cert.pem', 'utf-8'), + // cert: fs.readFileSync('./backend/idp_cert.pem', 'utf-8'), + cert: fs.readFileSync('./backend/idp_metadata.xml', 'utf-8'), }, function(profile, done) { console.log('SAML Profile:', profile); From b7420c5582f2d70e094867e1919840b2ad19bb3d Mon Sep 17 00:00:00 2001 From: Brendon Kupsch Date: Thu, 5 Dec 2024 23:06:05 -0500 Subject: [PATCH 087/163] should get back to idp login --- server.js | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/server.js b/server.js index bdca1a1..9be8ff2 100644 --- a/server.js +++ b/server.js @@ -47,15 +47,14 @@ const hashPassword = (password) => { // Passport SAML strategy configuration passport.use(new SamlStrategy( { - // remove :3001 from callbackUrl after new import - callbackUrl: 'https://facelect.capping.ecrl.marist.edu:3001/login/callback', + // callbackUrl: 'https://facelect.capping.ecrl.marist.edu/login/callback', + callbackUrl: 'http://facelect.capping.ecrl.marist.edu:3001/login/callback', path: '/login/callback', entryPoint: 'https://auth.it.marist.edu/idp/profile/SAML2/Redirect/SSO', issuer: 'https://facelect.capping.ecrl.marist.edu', // add decryptionPvk back after new import - // decryptionPvk: fs.readFileSync('./backend/facelect.capping.ecrl.marist.edu.key', 'utf-8'), - // cert: fs.readFileSync('./backend/idp_cert.pem', 'utf-8'), - cert: fs.readFileSync('./backend/idp_metadata.xml', 'utf-8'), + decryptionPvk: fs.readFileSync('./backend/facelect.capping.ecrl.marist.edu.key', 'utf-8'), + cert: fs.readFileSync('./backend/idp_cert.pem', 'utf-8'), }, function(profile, done) { console.log('SAML Profile:', profile); From 40bfbb616653e69ed36bf7d94162ae6c6f311ff5 Mon Sep 17 00:00:00 2001 From: Brendon Kupsch Date: Thu, 5 Dec 2024 23:07:48 -0500 Subject: [PATCH 088/163] got past login again, fixing error --- server.js | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/server.js b/server.js index 9be8ff2..cbea9db 100644 --- a/server.js +++ b/server.js @@ -56,16 +56,9 @@ passport.use(new SamlStrategy( decryptionPvk: fs.readFileSync('./backend/facelect.capping.ecrl.marist.edu.key', 'utf-8'), cert: fs.readFileSync('./backend/idp_cert.pem', 'utf-8'), }, - function(profile, done) { - console.log('SAML Profile:', profile); - findByEmail(profile.email, (err, user) => { - if (err) { - console.error('Error in SAML callback:', err); - return done(err); - } - return done(null, user); - }); - } + (profile, done) => { + return done(null, profile); + } )); passport.serializeUser((user, done) => { From fd0c8cccd218f96138488e6a48454d5db3b98f3d Mon Sep 17 00:00:00 2001 From: Brendon Kupsch Date: Thu, 5 Dec 2024 23:52:28 -0500 Subject: [PATCH 089/163] added proper callbackurl --- server.js | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/server.js b/server.js index cbea9db..55c8628 100644 --- a/server.js +++ b/server.js @@ -47,18 +47,21 @@ const hashPassword = (password) => { // Passport SAML strategy configuration passport.use(new SamlStrategy( { - // callbackUrl: 'https://facelect.capping.ecrl.marist.edu/login/callback', - callbackUrl: 'http://facelect.capping.ecrl.marist.edu:3001/login/callback', + callbackUrl: 'https://facelect.capping.ecrl.marist.edu/login/callback', + // callbackUrl: 'http://facelect.capping.ecrl.marist.edu:3001/login/callback', path: '/login/callback', entryPoint: 'https://auth.it.marist.edu/idp/profile/SAML2/Redirect/SSO', issuer: 'https://facelect.capping.ecrl.marist.edu', - // add decryptionPvk back after new import decryptionPvk: fs.readFileSync('./backend/facelect.capping.ecrl.marist.edu.key', 'utf-8'), cert: fs.readFileSync('./backend/idp_cert.pem', 'utf-8'), }, (profile, done) => { - return done(null, profile); - } + // Extract user information from the profile + const user = { + email: profile.emailAddress, + }; + return done(null, user); + } )); passport.serializeUser((user, done) => { @@ -85,6 +88,7 @@ app.get('/sso/login', passport.authenticate('saml', { failureRedirect: '/login' })); + // Route to handle admin login app.post('/admin-login', async (req, res) => { const { username, password } = req.body; // Capture username and password from request From cef826aa10caf953cad831b3b60004f6476d95a7 Mon Sep 17 00:00:00 2001 From: Brendon Kupsch <98063893+BrendonKupsch1@users.noreply.github.com> Date: Fri, 6 Dec 2024 14:13:50 -0500 Subject: [PATCH 090/163] removed old callbackurl --- server.js | 1 - 1 file changed, 1 deletion(-) diff --git a/server.js b/server.js index 55c8628..7899581 100644 --- a/server.js +++ b/server.js @@ -48,7 +48,6 @@ const hashPassword = (password) => { passport.use(new SamlStrategy( { callbackUrl: 'https://facelect.capping.ecrl.marist.edu/login/callback', - // callbackUrl: 'http://facelect.capping.ecrl.marist.edu:3001/login/callback', path: '/login/callback', entryPoint: 'https://auth.it.marist.edu/idp/profile/SAML2/Redirect/SSO', issuer: 'https://facelect.capping.ecrl.marist.edu', From 9283a0f43f311930fb5ab54065a4899bc4fcb199 Mon Sep 17 00:00:00 2001 From: Brendon Kupsch <98063893+BrendonKupsch1@users.noreply.github.com> Date: Fri, 6 Dec 2024 14:14:25 -0500 Subject: [PATCH 091/163] added logging for callback reached --- server.js | 1 + 1 file changed, 1 insertion(+) diff --git a/server.js b/server.js index 7899581..1b01997 100644 --- a/server.js +++ b/server.js @@ -78,6 +78,7 @@ app.post('/login/callback', failureRedirect: '/login', failureFlash: true }), (req, res) => { + console.log('SSO callback reached'); res.redirect('/user-profile'); }); From b01edaff02741cd4a2dc929431fb102b345d3c00 Mon Sep 17 00:00:00 2001 From: Brendon Kupsch <98063893+BrendonKupsch1@users.noreply.github.com> Date: Fri, 6 Dec 2024 14:46:52 -0500 Subject: [PATCH 092/163] removed port from login --- src/Login.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Login.tsx b/src/Login.tsx index fedbd53..a744c3b 100644 --- a/src/Login.tsx +++ b/src/Login.tsx @@ -6,7 +6,7 @@ import Footer from './components/footer/footer'; function handleSSOLogin() { console.log('going to the /login') - window.location.href = 'https://facelect.capping.ecrl.marist.edu:3001/sso/login'; + window.location.href = 'https://facelect.capping.ecrl.marist.edu/sso/login'; } From fb5d0dd716d6ac92a52d40928df11c32bc4310be Mon Sep 17 00:00:00 2001 From: Brendon Kupsch <98063893+BrendonKupsch1@users.noreply.github.com> Date: Fri, 6 Dec 2024 14:49:07 -0500 Subject: [PATCH 093/163] Revert "removed port from login" This reverts commit b01edaff02741cd4a2dc929431fb102b345d3c00. --- src/Login.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Login.tsx b/src/Login.tsx index a744c3b..fedbd53 100644 --- a/src/Login.tsx +++ b/src/Login.tsx @@ -6,7 +6,7 @@ import Footer from './components/footer/footer'; function handleSSOLogin() { console.log('going to the /login') - window.location.href = 'https://facelect.capping.ecrl.marist.edu/sso/login'; + window.location.href = 'https://facelect.capping.ecrl.marist.edu:3001/sso/login'; } From 5486e2772383c4c70b1d7cd04e875346bfadaca1 Mon Sep 17 00:00:00 2001 From: Brendon Kupsch Date: Fri, 6 Dec 2024 16:23:11 -0500 Subject: [PATCH 094/163] updated .key and .crt to .pem --- ...arist.edu.crt => 2024_facelect.capping.ecrl.marist.edu.pem} | 0 ...crl.marist.edu.key => facelect.capping.ecrl.marist.edu.pem} | 0 server.js | 3 ++- 3 files changed, 2 insertions(+), 1 deletion(-) rename backend/{2024_facelect.capping.ecrl.marist.edu.crt => 2024_facelect.capping.ecrl.marist.edu.pem} (100%) rename backend/{facelect.capping.ecrl.marist.edu.key => facelect.capping.ecrl.marist.edu.pem} (100%) diff --git a/backend/2024_facelect.capping.ecrl.marist.edu.crt b/backend/2024_facelect.capping.ecrl.marist.edu.pem similarity index 100% rename from backend/2024_facelect.capping.ecrl.marist.edu.crt rename to backend/2024_facelect.capping.ecrl.marist.edu.pem diff --git a/backend/facelect.capping.ecrl.marist.edu.key b/backend/facelect.capping.ecrl.marist.edu.pem similarity index 100% rename from backend/facelect.capping.ecrl.marist.edu.key rename to backend/facelect.capping.ecrl.marist.edu.pem diff --git a/server.js b/server.js index 1b01997..ae9bff7 100644 --- a/server.js +++ b/server.js @@ -51,7 +51,8 @@ passport.use(new SamlStrategy( path: '/login/callback', entryPoint: 'https://auth.it.marist.edu/idp/profile/SAML2/Redirect/SSO', issuer: 'https://facelect.capping.ecrl.marist.edu', - decryptionPvk: fs.readFileSync('./backend/facelect.capping.ecrl.marist.edu.key', 'utf-8'), + decryptionPvk: fs.readFileSync('./backend/facelect.capping.ecrl.marist.edu.pem', 'utf-8'), + privateCert: fs.readFileSync('./backend/2024_facelect.capping.ecrl.marist.edu.pem', 'utf-8'), cert: fs.readFileSync('./backend/idp_cert.pem', 'utf-8'), }, (profile, done) => { From 00eecf76cf38a4257e7ac5c3f9e4d144c1b69588 Mon Sep 17 00:00:00 2001 From: Brendon Kupsch Date: Fri, 6 Dec 2024 16:26:11 -0500 Subject: [PATCH 095/163] updated cert and key file name in options --- server.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server.js b/server.js index ae9bff7..b695c61 100644 --- a/server.js +++ b/server.js @@ -143,8 +143,8 @@ app.get('/faculty', async (req, res) => { // Read SSL certificate and key const options = { - key: fs.readFileSync('./backend/facelect.capping.ecrl.marist.edu.key'), - cert: fs.readFileSync('./backend/2024_facelect.capping.ecrl.marist.edu.crt'), + key: fs.readFileSync('./backend/facelect.capping.ecrl.marist.edu.pem'), + cert: fs.readFileSync('./backend/2024_facelect.capping.ecrl.marist.edu.pem'), ca: fs.readFileSync('./backend/2024_InCommonCA.crt'), }; From c957449743a17569174c5322efb98f400dbf9d7d Mon Sep 17 00:00:00 2001 From: Brendon Kupsch Date: Fri, 6 Dec 2024 18:11:11 -0500 Subject: [PATCH 096/163] new npm install --- package-lock.json | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/package-lock.json b/package-lock.json index df8af5b..a1a4948 100644 --- a/package-lock.json +++ b/package-lock.json @@ -18,11 +18,14 @@ "ag-grid": "^18.1.2", "ag-grid-react": "^32.2.2", "bcryptjs": "^2.4.3", + "body-parser": "^1.20.2", "concurrently": "^9.0.1", "cors": "^2.8.5", "crypto": "^1.0.1", "dotenv": "^16.4.5", + "express": "^4.18.2", "express-session": "^1.18.1", + "fs": "^0.0.1-security", "passport": "^0.7.0", "passport-saml": "^3.2.4", "pg": "^8.13.0", @@ -8952,6 +8955,12 @@ "node": ">= 0.6" } }, + "node_modules/fs": { + "version": "0.0.1-security", + "resolved": "https://registry.npmjs.org/fs/-/fs-0.0.1-security.tgz", + "integrity": "sha512-3XY9e1pP0CVEUCdj5BmfIZxRBTSDycnbqhIOGec9QYtmVH2fbLpj86CFWkrNOkt/Fvty4KZG5lTglL9j/gJ87w==", + "license": "ISC" + }, "node_modules/fs-extra": { "version": "10.1.0", "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-10.1.0.tgz", @@ -25178,6 +25187,11 @@ "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz", "integrity": "sha512-zJ2mQYM18rEFOudeV4GShTGIQ7RbzA7ozbU9I/XBpm7kqgMywgmylMwXHxZJmkVoYkna9d2pVXVXPdYTP9ej8Q==" }, + "fs": { + "version": "0.0.1-security", + "resolved": "https://registry.npmjs.org/fs/-/fs-0.0.1-security.tgz", + "integrity": "sha512-3XY9e1pP0CVEUCdj5BmfIZxRBTSDycnbqhIOGec9QYtmVH2fbLpj86CFWkrNOkt/Fvty4KZG5lTglL9j/gJ87w==" + }, "fs-extra": { "version": "10.1.0", "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-10.1.0.tgz", From 9ef7a94431e4fafa4813b066a4711288a4dfce8e Mon Sep 17 00:00:00 2001 From: Brendon Kupsch <98063893+BrendonKupsch1@users.noreply.github.com> Date: Fri, 6 Dec 2024 18:21:23 -0500 Subject: [PATCH 097/163] updated to @node-saml from passport-saml --- package.json | 1 + server.js | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index d3e1700..f3b3e47 100644 --- a/package.json +++ b/package.json @@ -3,6 +3,7 @@ "version": "0.1.0", "private": true, "dependencies": { + "@node-saml/passport-saml": "^1.0.0", "@testing-library/jest-dom": "^5.17.0", "@testing-library/react": "^13.4.0", "@testing-library/user-event": "^13.5.0", diff --git a/server.js b/server.js index b695c61..d1baee0 100644 --- a/server.js +++ b/server.js @@ -6,7 +6,7 @@ const { client, connectDB } = require('./db/connection'); // Import the client a const https = require('https'); const fs = require('fs'); const passport = require('passport'); -const SamlStrategy = require('passport-saml').Strategy; +const SamlStrategy = require('@node-saml/passport-saml').Strategy; const session = require('express-session'); const bodyParser = require("body-parser"); From cfb47b9e9e3a4a27d96a281c6b3aacc55bf88f05 Mon Sep 17 00:00:00 2001 From: Brendon Kupsch <98063893+BrendonKupsch1@users.noreply.github.com> Date: Fri, 6 Dec 2024 18:23:52 -0500 Subject: [PATCH 098/163] updated node-saml version --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index f3b3e47..592f1b4 100644 --- a/package.json +++ b/package.json @@ -3,7 +3,7 @@ "version": "0.1.0", "private": true, "dependencies": { - "@node-saml/passport-saml": "^1.0.0", + "@node-saml/passport-saml": "^5.0.0", "@testing-library/jest-dom": "^5.17.0", "@testing-library/react": "^13.4.0", "@testing-library/user-event": "^13.5.0", From a31da991af2810d285f12bc1e9bf0ead37c22cd7 Mon Sep 17 00:00:00 2001 From: Brendon Kupsch Date: Fri, 6 Dec 2024 18:26:22 -0500 Subject: [PATCH 099/163] updated package.json and node modules --- package-lock.json | 333 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 333 insertions(+) diff --git a/package-lock.json b/package-lock.json index a1a4948..0aca6cf 100644 --- a/package-lock.json +++ b/package-lock.json @@ -8,6 +8,7 @@ "name": "election-capping", "version": "0.1.0", "dependencies": { + "@node-saml/passport-saml": "^5.0.0", "@testing-library/jest-dom": "^5.17.0", "@testing-library/react": "^13.4.0", "@testing-library/user-event": "^13.5.0", @@ -3364,6 +3365,132 @@ "node": ">=4.0" } }, + "node_modules/@node-saml/node-saml": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/@node-saml/node-saml/-/node-saml-5.0.0.tgz", + "integrity": "sha512-4JGubfHgL5egpXiuo9bupSGn6mgpfOQ/brZZvv2Qiho5aJmW7O1khbjdB7tsTsCvNFtLLjQqm3BmvcRicJyA2g==", + "license": "MIT", + "dependencies": { + "@types/debug": "^4.1.12", + "@types/qs": "^6.9.11", + "@types/xml-encryption": "^1.2.4", + "@types/xml2js": "^0.4.14", + "@xmldom/is-dom-node": "^1.0.1", + "@xmldom/xmldom": "^0.8.10", + "debug": "^4.3.4", + "xml-crypto": "^6.0.0", + "xml-encryption": "^3.0.2", + "xml2js": "^0.6.2", + "xmlbuilder": "^15.1.1", + "xpath": "^0.0.34" + }, + "engines": { + "node": ">= 18" + } + }, + "node_modules/@node-saml/node-saml/node_modules/@xmldom/xmldom": { + "version": "0.8.10", + "resolved": "https://registry.npmjs.org/@xmldom/xmldom/-/xmldom-0.8.10.tgz", + "integrity": "sha512-2WALfTl4xo2SkGCYRt6rDTFfk9R1czmBvUQy12gK2KuRKIpWEhcbbzy8EZXtz/jkRqHX8bFEc6FC1HjX4TUWYw==", + "license": "MIT", + "engines": { + "node": ">=10.0.0" + } + }, + "node_modules/@node-saml/node-saml/node_modules/xml-crypto": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/xml-crypto/-/xml-crypto-6.0.0.tgz", + "integrity": "sha512-L3RgnkaDrHaYcCnoENv4Idzt1ZRj5U1z1BDH98QdDTQfssScx8adgxhd9qwyYo+E3fXbQZjEQH7aiXHLVgxGvw==", + "license": "MIT", + "dependencies": { + "@xmldom/is-dom-node": "^1.0.1", + "@xmldom/xmldom": "^0.8.10", + "xpath": "^0.0.33" + }, + "engines": { + "node": ">=16" + } + }, + "node_modules/@node-saml/node-saml/node_modules/xml-crypto/node_modules/xpath": { + "version": "0.0.33", + "resolved": "https://registry.npmjs.org/xpath/-/xpath-0.0.33.tgz", + "integrity": "sha512-NNXnzrkDrAzalLhIUc01jO2mOzXGXh1JwPgkihcLLzw98c0WgYDmmjSh1Kl3wzaxSVWMuA+fe0WTWOBDWCBmNA==", + "license": "MIT", + "engines": { + "node": ">=0.6.0" + } + }, + "node_modules/@node-saml/node-saml/node_modules/xml-encryption": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/xml-encryption/-/xml-encryption-3.0.2.tgz", + "integrity": "sha512-VxYXPvsWB01/aqVLd6ZMPWZ+qaj0aIdF+cStrVJMcFj3iymwZeI0ABzB3VqMYv48DkSpRhnrXqTUkR34j+UDyg==", + "license": "MIT", + "dependencies": { + "@xmldom/xmldom": "^0.8.5", + "escape-html": "^1.0.3", + "xpath": "0.0.32" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/@node-saml/node-saml/node_modules/xml-encryption/node_modules/xpath": { + "version": "0.0.32", + "resolved": "https://registry.npmjs.org/xpath/-/xpath-0.0.32.tgz", + "integrity": "sha512-rxMJhSIoiO8vXcWvSifKqhvV96GjiD5wYb8/QHdoRyQvraTpp4IEv944nhGausZZ3u7dhQXteZuZbaqfpB7uYw==", + "license": "MIT", + "engines": { + "node": ">=0.6.0" + } + }, + "node_modules/@node-saml/node-saml/node_modules/xml2js": { + "version": "0.6.2", + "resolved": "https://registry.npmjs.org/xml2js/-/xml2js-0.6.2.tgz", + "integrity": "sha512-T4rieHaC1EXcES0Kxxj4JWgaUQHDk+qwHcYOCFHfiwKz7tOVPLq7Hjq9dM1WCMhylqMEfP7hMcOIChvotiZegA==", + "license": "MIT", + "dependencies": { + "sax": ">=0.6.0", + "xmlbuilder": "~11.0.0" + }, + "engines": { + "node": ">=4.0.0" + } + }, + "node_modules/@node-saml/node-saml/node_modules/xml2js/node_modules/xmlbuilder": { + "version": "11.0.1", + "resolved": "https://registry.npmjs.org/xmlbuilder/-/xmlbuilder-11.0.1.tgz", + "integrity": "sha512-fDlsI/kFEx7gLvbecc0/ohLG50fugQp8ryHzMTuW9vSa1GJ0XYWKnhsUx7oie3G98+r56aTQIUB4kht42R3JvA==", + "license": "MIT", + "engines": { + "node": ">=4.0" + } + }, + "node_modules/@node-saml/node-saml/node_modules/xpath": { + "version": "0.0.34", + "resolved": "https://registry.npmjs.org/xpath/-/xpath-0.0.34.tgz", + "integrity": "sha512-FxF6+rkr1rNSQrhUNYrAFJpRXNzlDoMxeXN5qI84939ylEv3qqPFKa85Oxr6tDaJKqwW6KKyo2v26TSv3k6LeA==", + "license": "MIT", + "engines": { + "node": ">=0.6.0" + } + }, + "node_modules/@node-saml/passport-saml": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/@node-saml/passport-saml/-/passport-saml-5.0.0.tgz", + "integrity": "sha512-7miY7Id6UkP39+6HO68e3/V6eJwszytEQl+oCh0R/gbzp5nHA/WI1mvrI6NNUVq5gC5GEnDS8GTw7oj+Kx499w==", + "license": "MIT", + "dependencies": { + "@node-saml/node-saml": "^5.0.0", + "@types/express": "^4.17.21", + "@types/passport": "^1.0.16", + "@types/passport-strategy": "^0.2.38", + "passport": "^0.7.0", + "passport-strategy": "^1.0.0" + }, + "engines": { + "node": ">= 18" + } + }, "node_modules/@nodelib/fs.scandir": { "version": "2.1.5", "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", @@ -4169,6 +4296,15 @@ "@types/node": "*" } }, + "node_modules/@types/debug": { + "version": "4.1.12", + "resolved": "https://registry.npmjs.org/@types/debug/-/debug-4.1.12.tgz", + "integrity": "sha512-vIChWdVG3LG1SMxEvI/AK+FWJthlrqlTu7fbrlywTkkaONwk/UAGaULXRlf8vkzFBLVm0zkMdCquhL5aOjhXPQ==", + "license": "MIT", + "dependencies": { + "@types/ms": "*" + } + }, "node_modules/@types/eslint": { "version": "8.56.12", "resolved": "https://registry.npmjs.org/@types/eslint/-/eslint-8.56.12.tgz", @@ -4276,6 +4412,12 @@ "resolved": "https://registry.npmjs.org/@types/mime/-/mime-1.3.5.tgz", "integrity": "sha512-/pyBZWSLD2n0dcHE3hq8s8ZvcETHtEuF+3E7XVt0Ig2nvsVQXdghHVcEkIWjy9A0wKfTn97a/PSDYohKIlnP/w==" }, + "node_modules/@types/ms": { + "version": "0.7.34", + "resolved": "https://registry.npmjs.org/@types/ms/-/ms-0.7.34.tgz", + "integrity": "sha512-nG96G3Wp6acyAgJqGasjODb+acrI7KltPiRxzHPXnP3NgI28bpQDRv53olbqGXbfcgF5aiiHmO3xpwEpS5Ld9g==", + "license": "MIT" + }, "node_modules/@types/node": { "version": "16.18.109", "resolved": "https://registry.npmjs.org/@types/node/-/node-16.18.109.tgz", @@ -4294,6 +4436,25 @@ "resolved": "https://registry.npmjs.org/@types/parse-json/-/parse-json-4.0.2.tgz", "integrity": "sha512-dISoDXWWQwUquiKsyZ4Ng+HX2KsPL7LyHKHQwgGFEA3IaKac4Obd+h2a/a6waisAoepJlBcx9paWqjA8/HVjCw==" }, + "node_modules/@types/passport": { + "version": "1.0.17", + "resolved": "https://registry.npmjs.org/@types/passport/-/passport-1.0.17.tgz", + "integrity": "sha512-aciLyx+wDwT2t2/kJGJR2AEeBz0nJU4WuRX04Wu9Dqc5lSUtwu0WERPHYsLhF9PtseiAMPBGNUOtFjxZ56prsg==", + "license": "MIT", + "dependencies": { + "@types/express": "*" + } + }, + "node_modules/@types/passport-strategy": { + "version": "0.2.38", + "resolved": "https://registry.npmjs.org/@types/passport-strategy/-/passport-strategy-0.2.38.tgz", + "integrity": "sha512-GC6eMqqojOooq993Tmnmp7AUTbbQSgilyvpCYQjT+H6JfG/g6RGc7nXEniZlp0zyKJ0WUdOiZWLBZft9Yug1uA==", + "license": "MIT", + "dependencies": { + "@types/express": "*", + "@types/passport": "*" + } + }, "node_modules/@types/prettier": { "version": "2.7.3", "resolved": "https://registry.npmjs.org/@types/prettier/-/prettier-2.7.3.tgz", @@ -4423,6 +4584,24 @@ "@types/node": "*" } }, + "node_modules/@types/xml-encryption": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/@types/xml-encryption/-/xml-encryption-1.2.4.tgz", + "integrity": "sha512-I69K/WW1Dv7j6O3jh13z0X8sLWJRXbu5xnHDl9yHzUNDUBtUoBY058eb5s+x/WG6yZC1h8aKdI2EoyEPjyEh+Q==", + "license": "MIT", + "dependencies": { + "@types/node": "*" + } + }, + "node_modules/@types/xml2js": { + "version": "0.4.14", + "resolved": "https://registry.npmjs.org/@types/xml2js/-/xml2js-0.4.14.tgz", + "integrity": "sha512-4YnrRemBShWRO2QjvUin8ESA41rH+9nQGLUGZV/1IDhi3SL9OhdpNC/MrulTWuptXKwhx/aDxE7toV0f/ypIXQ==", + "license": "MIT", + "dependencies": { + "@types/node": "*" + } + }, "node_modules/@types/yargs": { "version": "16.0.9", "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-16.0.9.tgz", @@ -4790,6 +4969,15 @@ "@xtuc/long": "4.2.2" } }, + "node_modules/@xmldom/is-dom-node": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@xmldom/is-dom-node/-/is-dom-node-1.0.1.tgz", + "integrity": "sha512-CJDxIgE5I0FH+ttq/Fxy6nRpxP70+e2O048EPe85J2use3XKdatVM7dDVvFNjQudd9B49NPoZ+8PG49zj4Er8Q==", + "license": "MIT", + "engines": { + "node": ">= 16" + } + }, "node_modules/@xmldom/xmldom": { "version": "0.7.13", "resolved": "https://registry.npmjs.org/@xmldom/xmldom/-/xmldom-0.7.13.tgz", @@ -21132,6 +21320,100 @@ } } }, + "@node-saml/node-saml": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/@node-saml/node-saml/-/node-saml-5.0.0.tgz", + "integrity": "sha512-4JGubfHgL5egpXiuo9bupSGn6mgpfOQ/brZZvv2Qiho5aJmW7O1khbjdB7tsTsCvNFtLLjQqm3BmvcRicJyA2g==", + "requires": { + "@types/debug": "^4.1.12", + "@types/qs": "^6.9.11", + "@types/xml-encryption": "^1.2.4", + "@types/xml2js": "^0.4.14", + "@xmldom/is-dom-node": "^1.0.1", + "@xmldom/xmldom": "^0.8.10", + "debug": "^4.3.4", + "xml-crypto": "^6.0.0", + "xml-encryption": "^3.0.2", + "xml2js": "^0.6.2", + "xmlbuilder": "^15.1.1", + "xpath": "^0.0.34" + }, + "dependencies": { + "@xmldom/xmldom": { + "version": "0.8.10", + "resolved": "https://registry.npmjs.org/@xmldom/xmldom/-/xmldom-0.8.10.tgz", + "integrity": "sha512-2WALfTl4xo2SkGCYRt6rDTFfk9R1czmBvUQy12gK2KuRKIpWEhcbbzy8EZXtz/jkRqHX8bFEc6FC1HjX4TUWYw==" + }, + "xml-crypto": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/xml-crypto/-/xml-crypto-6.0.0.tgz", + "integrity": "sha512-L3RgnkaDrHaYcCnoENv4Idzt1ZRj5U1z1BDH98QdDTQfssScx8adgxhd9qwyYo+E3fXbQZjEQH7aiXHLVgxGvw==", + "requires": { + "@xmldom/is-dom-node": "^1.0.1", + "@xmldom/xmldom": "^0.8.10", + "xpath": "^0.0.33" + }, + "dependencies": { + "xpath": { + "version": "0.0.33", + "resolved": "https://registry.npmjs.org/xpath/-/xpath-0.0.33.tgz", + "integrity": "sha512-NNXnzrkDrAzalLhIUc01jO2mOzXGXh1JwPgkihcLLzw98c0WgYDmmjSh1Kl3wzaxSVWMuA+fe0WTWOBDWCBmNA==" + } + } + }, + "xml-encryption": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/xml-encryption/-/xml-encryption-3.0.2.tgz", + "integrity": "sha512-VxYXPvsWB01/aqVLd6ZMPWZ+qaj0aIdF+cStrVJMcFj3iymwZeI0ABzB3VqMYv48DkSpRhnrXqTUkR34j+UDyg==", + "requires": { + "@xmldom/xmldom": "^0.8.5", + "escape-html": "^1.0.3", + "xpath": "0.0.32" + }, + "dependencies": { + "xpath": { + "version": "0.0.32", + "resolved": "https://registry.npmjs.org/xpath/-/xpath-0.0.32.tgz", + "integrity": "sha512-rxMJhSIoiO8vXcWvSifKqhvV96GjiD5wYb8/QHdoRyQvraTpp4IEv944nhGausZZ3u7dhQXteZuZbaqfpB7uYw==" + } + } + }, + "xml2js": { + "version": "0.6.2", + "resolved": "https://registry.npmjs.org/xml2js/-/xml2js-0.6.2.tgz", + "integrity": "sha512-T4rieHaC1EXcES0Kxxj4JWgaUQHDk+qwHcYOCFHfiwKz7tOVPLq7Hjq9dM1WCMhylqMEfP7hMcOIChvotiZegA==", + "requires": { + "sax": ">=0.6.0", + "xmlbuilder": "~11.0.0" + }, + "dependencies": { + "xmlbuilder": { + "version": "11.0.1", + "resolved": "https://registry.npmjs.org/xmlbuilder/-/xmlbuilder-11.0.1.tgz", + "integrity": "sha512-fDlsI/kFEx7gLvbecc0/ohLG50fugQp8ryHzMTuW9vSa1GJ0XYWKnhsUx7oie3G98+r56aTQIUB4kht42R3JvA==" + } + } + }, + "xpath": { + "version": "0.0.34", + "resolved": "https://registry.npmjs.org/xpath/-/xpath-0.0.34.tgz", + "integrity": "sha512-FxF6+rkr1rNSQrhUNYrAFJpRXNzlDoMxeXN5qI84939ylEv3qqPFKa85Oxr6tDaJKqwW6KKyo2v26TSv3k6LeA==" + } + } + }, + "@node-saml/passport-saml": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/@node-saml/passport-saml/-/passport-saml-5.0.0.tgz", + "integrity": "sha512-7miY7Id6UkP39+6HO68e3/V6eJwszytEQl+oCh0R/gbzp5nHA/WI1mvrI6NNUVq5gC5GEnDS8GTw7oj+Kx499w==", + "requires": { + "@node-saml/node-saml": "^5.0.0", + "@types/express": "^4.17.21", + "@types/passport": "^1.0.16", + "@types/passport-strategy": "^0.2.38", + "passport": "^0.7.0", + "passport-strategy": "^1.0.0" + } + }, "@nodelib/fs.scandir": { "version": "2.1.5", "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", @@ -21680,6 +21962,14 @@ "@types/node": "*" } }, + "@types/debug": { + "version": "4.1.12", + "resolved": "https://registry.npmjs.org/@types/debug/-/debug-4.1.12.tgz", + "integrity": "sha512-vIChWdVG3LG1SMxEvI/AK+FWJthlrqlTu7fbrlywTkkaONwk/UAGaULXRlf8vkzFBLVm0zkMdCquhL5aOjhXPQ==", + "requires": { + "@types/ms": "*" + } + }, "@types/eslint": { "version": "8.56.12", "resolved": "https://registry.npmjs.org/@types/eslint/-/eslint-8.56.12.tgz", @@ -21787,6 +22077,11 @@ "resolved": "https://registry.npmjs.org/@types/mime/-/mime-1.3.5.tgz", "integrity": "sha512-/pyBZWSLD2n0dcHE3hq8s8ZvcETHtEuF+3E7XVt0Ig2nvsVQXdghHVcEkIWjy9A0wKfTn97a/PSDYohKIlnP/w==" }, + "@types/ms": { + "version": "0.7.34", + "resolved": "https://registry.npmjs.org/@types/ms/-/ms-0.7.34.tgz", + "integrity": "sha512-nG96G3Wp6acyAgJqGasjODb+acrI7KltPiRxzHPXnP3NgI28bpQDRv53olbqGXbfcgF5aiiHmO3xpwEpS5Ld9g==" + }, "@types/node": { "version": "16.18.109", "resolved": "https://registry.npmjs.org/@types/node/-/node-16.18.109.tgz", @@ -21805,6 +22100,23 @@ "resolved": "https://registry.npmjs.org/@types/parse-json/-/parse-json-4.0.2.tgz", "integrity": "sha512-dISoDXWWQwUquiKsyZ4Ng+HX2KsPL7LyHKHQwgGFEA3IaKac4Obd+h2a/a6waisAoepJlBcx9paWqjA8/HVjCw==" }, + "@types/passport": { + "version": "1.0.17", + "resolved": "https://registry.npmjs.org/@types/passport/-/passport-1.0.17.tgz", + "integrity": "sha512-aciLyx+wDwT2t2/kJGJR2AEeBz0nJU4WuRX04Wu9Dqc5lSUtwu0WERPHYsLhF9PtseiAMPBGNUOtFjxZ56prsg==", + "requires": { + "@types/express": "*" + } + }, + "@types/passport-strategy": { + "version": "0.2.38", + "resolved": "https://registry.npmjs.org/@types/passport-strategy/-/passport-strategy-0.2.38.tgz", + "integrity": "sha512-GC6eMqqojOooq993Tmnmp7AUTbbQSgilyvpCYQjT+H6JfG/g6RGc7nXEniZlp0zyKJ0WUdOiZWLBZft9Yug1uA==", + "requires": { + "@types/express": "*", + "@types/passport": "*" + } + }, "@types/prettier": { "version": "2.7.3", "resolved": "https://registry.npmjs.org/@types/prettier/-/prettier-2.7.3.tgz", @@ -21934,6 +22246,22 @@ "@types/node": "*" } }, + "@types/xml-encryption": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/@types/xml-encryption/-/xml-encryption-1.2.4.tgz", + "integrity": "sha512-I69K/WW1Dv7j6O3jh13z0X8sLWJRXbu5xnHDl9yHzUNDUBtUoBY058eb5s+x/WG6yZC1h8aKdI2EoyEPjyEh+Q==", + "requires": { + "@types/node": "*" + } + }, + "@types/xml2js": { + "version": "0.4.14", + "resolved": "https://registry.npmjs.org/@types/xml2js/-/xml2js-0.4.14.tgz", + "integrity": "sha512-4YnrRemBShWRO2QjvUin8ESA41rH+9nQGLUGZV/1IDhi3SL9OhdpNC/MrulTWuptXKwhx/aDxE7toV0f/ypIXQ==", + "requires": { + "@types/node": "*" + } + }, "@types/yargs": { "version": "16.0.9", "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-16.0.9.tgz", @@ -22198,6 +22526,11 @@ "@xtuc/long": "4.2.2" } }, + "@xmldom/is-dom-node": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@xmldom/is-dom-node/-/is-dom-node-1.0.1.tgz", + "integrity": "sha512-CJDxIgE5I0FH+ttq/Fxy6nRpxP70+e2O048EPe85J2use3XKdatVM7dDVvFNjQudd9B49NPoZ+8PG49zj4Er8Q==" + }, "@xmldom/xmldom": { "version": "0.7.13", "resolved": "https://registry.npmjs.org/@xmldom/xmldom/-/xmldom-0.7.13.tgz", From 15aeccca296d4d3ee246294d3f6dbb5ea5b6f393 Mon Sep 17 00:00:00 2001 From: Brendon Kupsch <98063893+BrendonKupsch1@users.noreply.github.com> Date: Fri, 6 Dec 2024 18:27:56 -0500 Subject: [PATCH 100/163] updated name of idpCert --- server.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server.js b/server.js index d1baee0..6108906 100644 --- a/server.js +++ b/server.js @@ -53,7 +53,7 @@ passport.use(new SamlStrategy( issuer: 'https://facelect.capping.ecrl.marist.edu', decryptionPvk: fs.readFileSync('./backend/facelect.capping.ecrl.marist.edu.pem', 'utf-8'), privateCert: fs.readFileSync('./backend/2024_facelect.capping.ecrl.marist.edu.pem', 'utf-8'), - cert: fs.readFileSync('./backend/idp_cert.pem', 'utf-8'), + idpCert: fs.readFileSync('./backend/idp_cert.pem', 'utf-8'), }, (profile, done) => { // Extract user information from the profile From 061a390aeec911a3c5d081019c2707554e038475 Mon Sep 17 00:00:00 2001 From: Brendon Kupsch Date: Fri, 6 Dec 2024 21:25:48 -0500 Subject: [PATCH 101/163] Updated packages --- idp_metadata.xml | 162 ++++++++++++++++++++++++++++++++++++++++++ src/LoginCallback.tsx | 12 ++++ 2 files changed, 174 insertions(+) create mode 100644 idp_metadata.xml create mode 100644 src/LoginCallback.tsx diff --git a/idp_metadata.xml b/idp_metadata.xml new file mode 100644 index 0000000..2e10895 --- /dev/null +++ b/idp_metadata.xml @@ -0,0 +1,162 @@ + + + + + + + marist.edu + + + + + + + +MIIDZDCCAkygAwIBAgIEWUPr+jANBgkqhkiG9w0BAQsFADB0MQswCQYDVQQGEwJV +UzELMAkGA1UECAwCTlkxFTATBgNVBAcMDFBvdWdoa2VlcHNpZTEXMBUGA1UECgwO +TWFyaXN0IENvbGxlZ2UxCzAJBgNVBAsMAklUMRswGQYDVQQDDBJhdXRoLml0Lm1h +cmlzdC5lZHUwHhcNMTcwNjE2MTQzNDIzWhcNMjcwNjE2MTQzNDIzWjB0MQswCQYD +VQQGEwJVUzELMAkGA1UECAwCTlkxFTATBgNVBAcMDFBvdWdoa2VlcHNpZTEXMBUG +A1UECgwOTWFyaXN0IENvbGxlZ2UxCzAJBgNVBAsMAklUMRswGQYDVQQDDBJhdXRo +Lml0Lm1hcmlzdC5lZHUwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDE +43jyxC++dV0lYffBNFiMiSALRzZQIKRGGybuLobzyN7/ItAex9ABY36IKPQ7OPPt +sKofjX4VLcVpehiDAUeQpLOUIOWiEJ3+QBR7WPqGRLW2Hen3utApH1a1+iA5nzqE +uhpu0SMqC1g9Rt5m0ZGAuK+jT4KWfaEe18yphF8szpcVzwfAACr8cbYGSobMbOsz +DgcQnXS+m1qorsn7fLZOa6R4pve/G9YZunFAJXBdmkHGo8Rmd6s/kIgQJZIksqkZ +50gpDqzbIlKRYfHGroztjdGWcXkHUL7UXjUCNbQOvIvml4D8s2JtwgFRwkvo8BJ5 +KCKjJZQi9GZ3SRs4zyabAgMBAAEwDQYJKoZIhvcNAQELBQADggEBAC+wiZCUiTlL +MjNPACIe7f2wz5oit+HYRx3jTVTtWX8t+dWlEMK94LNysPuuU110qy0VeBIPgXXz +Izka8yTOhxbBkQWG/5t7bAygOHhcyd6/XOv8pcwd1K+XMfu/BwLgyqk3pasERPu3 +hClNTmEyAkH1r09+k2TJpXqwA1UU6UGtHSqE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z56SyReQlvvnvR +CaHkdngVTOsxkf62G9jDPWRqhvLcVlZs0MqB57KqOeK+N4GK0pUnLudJI3bVYND8 +G8SZKZ6a0VNvVOw57puzBvrRsUsBLhmLw2zeC/8cNN82Yzhgl60b+U6N/9oK4Rfl +5nFu5yzfotgdK4p1FOJRduX1+2kueL2piqy2WpD9HmRGxVsgYnfVDheyHIvttdz6 +/ZG7Jrrie4ehzwIDAQABMA0GCSqGSIb3DQEBCwUAA4IBAQCHwNrdDPI+r2PWjA5R +GXNsBTAsEOmA8+lFGQjp4YkCXudmn/FHWT5uBcw+lLKOM6KS8TrDRAWr6UYAKNVU +SbgAPcY1rR0uCQ8fAvLvM6t5igUZLE1FwzNeLSV6ea5A7e828w5DQSQdoEY79SDG +TIjzs0V8I+r3AZI9EstmaO345HVU3kHFFVuBTNP5yHzzeXlqrPaCgOnsAWZsd2VV +tu3y3PgBWSJU1+1XnedtikbmqrQw2VzR0LUSq3CO1Eh5y82YHPVFL5Y6T15I5oyR +IlEf+60ae5V8mYuV4eXaYIImm3/IbYNchlMgPOOI30YYwGFLHqYS8BX/Ga0YoEOk +1R/Q + + + + + + + + + + + + + + diff --git a/src/LoginCallback.tsx b/src/LoginCallback.tsx new file mode 100644 index 0000000..7c58de5 --- /dev/null +++ b/src/LoginCallback.tsx @@ -0,0 +1,12 @@ +import React from 'react'; + +const Callback: React.FC = () => { + return ( +
+ {/* Your page content goes here */} +

Hello, World!

+
+ ); +}; + +export default Callback; From 4f85029810db779734ac519dc9511fea0cc51444 Mon Sep 17 00:00:00 2001 From: Brendon Kupsch Date: Fri, 6 Dec 2024 21:32:40 -0500 Subject: [PATCH 102/163] modify saml strategy --- server.js | 33 +++++++++++++++++++-------------- 1 file changed, 19 insertions(+), 14 deletions(-) diff --git a/server.js b/server.js index 6108906..b28d45c 100644 --- a/server.js +++ b/server.js @@ -73,22 +73,27 @@ passport.deserializeUser((user, done) => { }); // SSO callback route -app.post('/login/callback', - bodyParser.urlencoded({ extended: false }), - passport.authenticate('saml', { - failureRedirect: '/login', - failureFlash: true -}), (req, res) => { - console.log('SSO callback reached'); - res.redirect('/user-profile'); -}); +const bodyParser = require("body-parser"); -// SSO login route -app.get('/sso/login', passport.authenticate('saml', { - successRedirect: '/user-profile', - failureRedirect: '/login' -})); +app.post( + "/login/callback", + bodyParser.urlencoded({ extended: false }), + passport.authenticate("saml", { + failureRedirect: "/", + failureFlash: true, + }), + function (req, res) { + res.redirect("/user-profile"); + }, +); +// SSO login route +app.get('/sso/login', + passport.authenticate("saml", { failureRedirect: "/", failureFlash: true }), + function (req, res) { + res.redirect("/"); + }, +); // Route to handle admin login app.post('/admin-login', async (req, res) => { From 06aa23aacb0c586711bbba42f39f2cd3ec39b35b Mon Sep 17 00:00:00 2001 From: Brendon Kupsch Date: Fri, 6 Dec 2024 21:33:38 -0500 Subject: [PATCH 103/163] removed duplicate line --- server.js | 2 -- 1 file changed, 2 deletions(-) diff --git a/server.js b/server.js index b28d45c..83f54f5 100644 --- a/server.js +++ b/server.js @@ -73,8 +73,6 @@ passport.deserializeUser((user, done) => { }); // SSO callback route -const bodyParser = require("body-parser"); - app.post( "/login/callback", bodyParser.urlencoded({ extended: false }), From 2f53cea83d4598e322981da6129a2d48556da406 Mon Sep 17 00:00:00 2001 From: Brendon Kupsch Date: Fri, 6 Dec 2024 21:35:43 -0500 Subject: [PATCH 104/163] added logging --- server.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/server.js b/server.js index 83f54f5..13ebcf0 100644 --- a/server.js +++ b/server.js @@ -9,6 +9,9 @@ const passport = require('passport'); const SamlStrategy = require('@node-saml/passport-saml').Strategy; const session = require('express-session'); const bodyParser = require("body-parser"); +const morgan = require('morgan'); + +app.use(morgan('common')); // Log HTTP requests const app = express(); From 7909e846f11878ba02897a027eacf2ae0fdffa13 Mon Sep 17 00:00:00 2001 From: Brendon Kupsch Date: Fri, 6 Dec 2024 21:36:47 -0500 Subject: [PATCH 105/163] added morgan loggin --- package-lock.json | 112 ++++++++++++++++++++++++++++++++++++++++++++++ package.json | 3 +- 2 files changed, 114 insertions(+), 1 deletion(-) diff --git a/package-lock.json b/package-lock.json index 0aca6cf..ecd36b1 100644 --- a/package-lock.json +++ b/package-lock.json @@ -27,6 +27,7 @@ "express": "^4.18.2", "express-session": "^1.18.1", "fs": "^0.0.1-security", + "morgan": "^1.10.0", "passport": "^0.7.0", "passport-saml": "^3.2.4", "pg": "^8.13.0", @@ -5844,6 +5845,24 @@ "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==" }, + "node_modules/basic-auth": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/basic-auth/-/basic-auth-2.0.1.tgz", + "integrity": "sha512-NF+epuEdnUYVlGuhaxbbq+dvJttwLnGY+YixlXlME5KpQ5W3CnXA5cVTneY3SPbPDRkcjMbifrwmFYcClgOZeg==", + "license": "MIT", + "dependencies": { + "safe-buffer": "5.1.2" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/basic-auth/node_modules/safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", + "license": "MIT" + }, "node_modules/batch": { "version": "0.6.1", "resolved": "https://registry.npmjs.org/batch/-/batch-0.6.1.tgz", @@ -13079,6 +13098,49 @@ "mkdirp": "bin/cmd.js" } }, + "node_modules/morgan": { + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/morgan/-/morgan-1.10.0.tgz", + "integrity": "sha512-AbegBVI4sh6El+1gNwvD5YIck7nSA36weD7xvIxG4in80j/UoK8AEGaWnnz8v1GxonMCltmlNs5ZKbGvl9b1XQ==", + "license": "MIT", + "dependencies": { + "basic-auth": "~2.0.1", + "debug": "2.6.9", + "depd": "~2.0.0", + "on-finished": "~2.3.0", + "on-headers": "~1.0.2" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/morgan/node_modules/debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "license": "MIT", + "dependencies": { + "ms": "2.0.0" + } + }, + "node_modules/morgan/node_modules/ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", + "license": "MIT" + }, + "node_modules/morgan/node_modules/on-finished": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.3.0.tgz", + "integrity": "sha512-ikqdkGAAyf/X/gPhXGvfgAytDZtDbr+bkNUJ0N9h5MI/dmdgCs3l6hoHrcUv41sRKew3jIwrp4qQDXiK99Utww==", + "license": "MIT", + "dependencies": { + "ee-first": "1.1.1" + }, + "engines": { + "node": ">= 0.8" + } + }, "node_modules/ms": { "version": "2.1.3", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", @@ -23153,6 +23215,21 @@ "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==" }, + "basic-auth": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/basic-auth/-/basic-auth-2.0.1.tgz", + "integrity": "sha512-NF+epuEdnUYVlGuhaxbbq+dvJttwLnGY+YixlXlME5KpQ5W3CnXA5cVTneY3SPbPDRkcjMbifrwmFYcClgOZeg==", + "requires": { + "safe-buffer": "5.1.2" + }, + "dependencies": { + "safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" + } + } + }, "batch": { "version": "0.6.1", "resolved": "https://registry.npmjs.org/batch/-/batch-0.6.1.tgz", @@ -28325,6 +28402,41 @@ "minimist": "^1.2.6" } }, + "morgan": { + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/morgan/-/morgan-1.10.0.tgz", + "integrity": "sha512-AbegBVI4sh6El+1gNwvD5YIck7nSA36weD7xvIxG4in80j/UoK8AEGaWnnz8v1GxonMCltmlNs5ZKbGvl9b1XQ==", + "requires": { + "basic-auth": "~2.0.1", + "debug": "2.6.9", + "depd": "~2.0.0", + "on-finished": "~2.3.0", + "on-headers": "~1.0.2" + }, + "dependencies": { + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "requires": { + "ms": "2.0.0" + } + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==" + }, + "on-finished": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.3.0.tgz", + "integrity": "sha512-ikqdkGAAyf/X/gPhXGvfgAytDZtDbr+bkNUJ0N9h5MI/dmdgCs3l6hoHrcUv41sRKew3jIwrp4qQDXiK99Utww==", + "requires": { + "ee-first": "1.1.1" + } + } + } + }, "ms": { "version": "2.1.3", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", diff --git a/package.json b/package.json index 592f1b4..55dfa24 100644 --- a/package.json +++ b/package.json @@ -22,6 +22,7 @@ "express": "^4.18.2", "express-session": "^1.18.1", "fs": "^0.0.1-security", + "morgan": "^1.10.0", "passport": "^0.7.0", "passport-saml": "^3.2.4", "pg": "^8.13.0", @@ -57,4 +58,4 @@ "last 1 safari version" ] } -} \ No newline at end of file +} From 83e0dadb657a8bddcb2f59f140873237ce46cc5f Mon Sep 17 00:00:00 2001 From: Brendon Kupsch Date: Fri, 6 Dec 2024 21:37:08 -0500 Subject: [PATCH 106/163] moved log line --- server.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/server.js b/server.js index 13ebcf0..7fd0fde 100644 --- a/server.js +++ b/server.js @@ -11,7 +11,6 @@ const session = require('express-session'); const bodyParser = require("body-parser"); const morgan = require('morgan'); -app.use(morgan('common')); // Log HTTP requests const app = express(); @@ -26,6 +25,8 @@ app.use(cors()); app.use(express.json()); // Parse incoming JSON data +app.use(morgan('common')); // Log HTTP requests + // Configure session middleware app.use(session({ // secret: 'Faculty%Defeat$248902', From e8eba65e9973d337cfcf1672c6b1d6b21b1cd2ec Mon Sep 17 00:00:00 2001 From: Brendon Kupsch Date: Fri, 6 Dec 2024 21:58:11 -0500 Subject: [PATCH 107/163] added route for testing --- server.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/server.js b/server.js index 7fd0fde..28cbcd4 100644 --- a/server.js +++ b/server.js @@ -77,7 +77,7 @@ passport.deserializeUser((user, done) => { }); // SSO callback route -app.post( +/* app.post( "/login/callback", bodyParser.urlencoded({ extended: false }), passport.authenticate("saml", { @@ -87,7 +87,12 @@ app.post( function (req, res) { res.redirect("/user-profile"); }, -); +); */ + +// simple callback route for testing +app.post('/login/callback', (req, res) => { + res.redirect('/user-profile'); +}); // SSO login route app.get('/sso/login', From a338d70364b9ab00085efbc394b636239e70d728 Mon Sep 17 00:00:00 2001 From: Brendon Kupsch Date: Fri, 6 Dec 2024 21:59:53 -0500 Subject: [PATCH 108/163] callback route changes --- server.js | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/server.js b/server.js index 28cbcd4..6944131 100644 --- a/server.js +++ b/server.js @@ -77,8 +77,8 @@ passport.deserializeUser((user, done) => { }); // SSO callback route -/* app.post( - "/login/callback", +app.post( + "https://facelect.capping.ecrl.marist.edu/login/callback", bodyParser.urlencoded({ extended: false }), passport.authenticate("saml", { failureRedirect: "/", @@ -87,12 +87,8 @@ passport.deserializeUser((user, done) => { function (req, res) { res.redirect("/user-profile"); }, -); */ +); -// simple callback route for testing -app.post('/login/callback', (req, res) => { - res.redirect('/user-profile'); -}); // SSO login route app.get('/sso/login', From a0d9f052489689e8636c917a01bf64ba699c698a Mon Sep 17 00:00:00 2001 From: Brendon Kupsch Date: Fri, 6 Dec 2024 22:01:33 -0500 Subject: [PATCH 109/163] undid changes --- server.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server.js b/server.js index 6944131..4f84bd3 100644 --- a/server.js +++ b/server.js @@ -78,7 +78,7 @@ passport.deserializeUser((user, done) => { // SSO callback route app.post( - "https://facelect.capping.ecrl.marist.edu/login/callback", + '/login/callback', bodyParser.urlencoded({ extended: false }), passport.authenticate("saml", { failureRedirect: "/", From 65e2f24b938815b3b341dcfd8809fdb39b235790 Mon Sep 17 00:00:00 2001 From: Brendon Kupsch Date: Fri, 6 Dec 2024 22:05:08 -0500 Subject: [PATCH 110/163] removed path from saml conf --- server.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server.js b/server.js index 4f84bd3..9ffd599 100644 --- a/server.js +++ b/server.js @@ -52,7 +52,7 @@ const hashPassword = (password) => { passport.use(new SamlStrategy( { callbackUrl: 'https://facelect.capping.ecrl.marist.edu/login/callback', - path: '/login/callback', + // path: '/login/callback', entryPoint: 'https://auth.it.marist.edu/idp/profile/SAML2/Redirect/SSO', issuer: 'https://facelect.capping.ecrl.marist.edu', decryptionPvk: fs.readFileSync('./backend/facelect.capping.ecrl.marist.edu.pem', 'utf-8'), From 2d3d2e32820d625db7b33a1d04726ec356df9ad8 Mon Sep 17 00:00:00 2001 From: Brendon Kupsch Date: Fri, 6 Dec 2024 22:07:14 -0500 Subject: [PATCH 111/163] removed callback for path --- server.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server.js b/server.js index 9ffd599..aad1615 100644 --- a/server.js +++ b/server.js @@ -51,8 +51,8 @@ const hashPassword = (password) => { // Passport SAML strategy configuration passport.use(new SamlStrategy( { - callbackUrl: 'https://facelect.capping.ecrl.marist.edu/login/callback', - // path: '/login/callback', + // callbackUrl: 'https://facelect.capping.ecrl.marist.edu/login/callback', + path: '/login/callback', entryPoint: 'https://auth.it.marist.edu/idp/profile/SAML2/Redirect/SSO', issuer: 'https://facelect.capping.ecrl.marist.edu', decryptionPvk: fs.readFileSync('./backend/facelect.capping.ecrl.marist.edu.pem', 'utf-8'), From 9e016f3b409962f65b1d1f6c40ea0d3f6278cbaa Mon Sep 17 00:00:00 2001 From: Brendon Kupsch Date: Fri, 6 Dec 2024 22:08:42 -0500 Subject: [PATCH 112/163] undid changes from last two --- server.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server.js b/server.js index aad1615..4f84bd3 100644 --- a/server.js +++ b/server.js @@ -51,7 +51,7 @@ const hashPassword = (password) => { // Passport SAML strategy configuration passport.use(new SamlStrategy( { - // callbackUrl: 'https://facelect.capping.ecrl.marist.edu/login/callback', + callbackUrl: 'https://facelect.capping.ecrl.marist.edu/login/callback', path: '/login/callback', entryPoint: 'https://auth.it.marist.edu/idp/profile/SAML2/Redirect/SSO', issuer: 'https://facelect.capping.ecrl.marist.edu', From 302e5b2354f01b7f360d7b4496a291fa5c4af1b1 Mon Sep 17 00:00:00 2001 From: Brendon Kupsch Date: Fri, 6 Dec 2024 22:16:07 -0500 Subject: [PATCH 113/163] route changes --- server.js | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/server.js b/server.js index 4f84bd3..c547e2f 100644 --- a/server.js +++ b/server.js @@ -85,7 +85,7 @@ app.post( failureFlash: true, }), function (req, res) { - res.redirect("/user-profile"); + res.redirect("/"); }, ); @@ -98,6 +98,15 @@ app.get('/sso/login', }, ); +// user-profile route +app.get('/user-profile', (req, res) => { + if (req.isAuthenticated()) { + res.json(req.user); + } else { + res.redirect('/login'); + } +}); + // Route to handle admin login app.post('/admin-login', async (req, res) => { const { username, password } = req.body; // Capture username and password from request From 2289ee798440303d391d70e63fb0d6ea310c7877 Mon Sep 17 00:00:00 2001 From: Brendon Kupsch Date: Fri, 6 Dec 2024 22:23:29 -0500 Subject: [PATCH 114/163] trying to fix post error --- server.js | 9 --------- 1 file changed, 9 deletions(-) diff --git a/server.js b/server.js index c547e2f..ece4451 100644 --- a/server.js +++ b/server.js @@ -98,15 +98,6 @@ app.get('/sso/login', }, ); -// user-profile route -app.get('/user-profile', (req, res) => { - if (req.isAuthenticated()) { - res.json(req.user); - } else { - res.redirect('/login'); - } -}); - // Route to handle admin login app.post('/admin-login', async (req, res) => { const { username, password } = req.body; // Capture username and password from request From fe7b3ff8f65c031fb44262154d96ca6286ebba65 Mon Sep 17 00:00:00 2001 From: Brendon Kupsch Date: Fri, 6 Dec 2024 22:24:00 -0500 Subject: [PATCH 115/163] trying to fix post error --- server.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/server.js b/server.js index ece4451..35ec93f 100644 --- a/server.js +++ b/server.js @@ -85,10 +85,17 @@ app.post( failureFlash: true, }), function (req, res) { - res.redirect("/"); + res.redirect("/user-profile"); // Redirect to user-profile after successful login }, ); +// Separate route for user profile +app.get('/user-profile', (req, res) => { + if (!req.isAuthenticated()) { + return res.redirect('/'); + } + res.send(`Hello ${req.user.email}, welcome to your profile!`); +}); // SSO login route app.get('/sso/login', From e9207522c4324f196162e661be6ef673a5fcbab1 Mon Sep 17 00:00:00 2001 From: Brendon Kupsch Date: Fri, 6 Dec 2024 22:25:32 -0500 Subject: [PATCH 116/163] undid changes --- server.js | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/server.js b/server.js index 35ec93f..5c49cfd 100644 --- a/server.js +++ b/server.js @@ -85,18 +85,10 @@ app.post( failureFlash: true, }), function (req, res) { - res.redirect("/user-profile"); // Redirect to user-profile after successful login + res.redirect("/user-profile"); // Original redirection }, ); -// Separate route for user profile -app.get('/user-profile', (req, res) => { - if (!req.isAuthenticated()) { - return res.redirect('/'); - } - res.send(`Hello ${req.user.email}, welcome to your profile!`); -}); - // SSO login route app.get('/sso/login', passport.authenticate("saml", { failureRedirect: "/", failureFlash: true }), From 6a1c6297a1a96209693a4a692993c4725afd261f Mon Sep 17 00:00:00 2001 From: Brendon Kupsch Date: Fri, 6 Dec 2024 22:32:02 -0500 Subject: [PATCH 117/163] testing saml config --- server.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/server.js b/server.js index 5c49cfd..d0fc5cb 100644 --- a/server.js +++ b/server.js @@ -58,6 +58,8 @@ passport.use(new SamlStrategy( decryptionPvk: fs.readFileSync('./backend/facelect.capping.ecrl.marist.edu.pem', 'utf-8'), privateCert: fs.readFileSync('./backend/2024_facelect.capping.ecrl.marist.edu.pem', 'utf-8'), idpCert: fs.readFileSync('./backend/idp_cert.pem', 'utf-8'), + wantAssertionsSigned: false, + wantAuthnResponseSigned: false }, (profile, done) => { // Extract user information from the profile From e09423dfd0400180ecd567deda03cd99ce48655e Mon Sep 17 00:00:00 2001 From: Brendon Kupsch Date: Fri, 6 Dec 2024 22:33:05 -0500 Subject: [PATCH 118/163] Update server.js --- server.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server.js b/server.js index d0fc5cb..ed1c960 100644 --- a/server.js +++ b/server.js @@ -58,8 +58,8 @@ passport.use(new SamlStrategy( decryptionPvk: fs.readFileSync('./backend/facelect.capping.ecrl.marist.edu.pem', 'utf-8'), privateCert: fs.readFileSync('./backend/2024_facelect.capping.ecrl.marist.edu.pem', 'utf-8'), idpCert: fs.readFileSync('./backend/idp_cert.pem', 'utf-8'), - wantAssertionsSigned: false, - wantAuthnResponseSigned: false + wantAssertionsSigned: true, + wantAuthnResponseSigned: true, }, (profile, done) => { // Extract user information from the profile From b8b3b245e3c425db67e22bddc5a48d762a1be391 Mon Sep 17 00:00:00 2001 From: Brendon Kupsch Date: Fri, 6 Dec 2024 22:38:25 -0500 Subject: [PATCH 119/163] changed post to get --- server.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server.js b/server.js index ed1c960..91125a6 100644 --- a/server.js +++ b/server.js @@ -79,7 +79,7 @@ passport.deserializeUser((user, done) => { }); // SSO callback route -app.post( +app.get( '/login/callback', bodyParser.urlencoded({ extended: false }), passport.authenticate("saml", { @@ -87,7 +87,7 @@ app.post( failureFlash: true, }), function (req, res) { - res.redirect("/user-profile"); // Original redirection + res.redirect("/user-profile"); }, ); From 2b0b3eec2e391555d6f51b6234fc1db012f6cb31 Mon Sep 17 00:00:00 2001 From: Brendon Kupsch Date: Fri, 6 Dec 2024 22:48:43 -0500 Subject: [PATCH 120/163] new saml conf --- server.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/server.js b/server.js index 91125a6..b13e074 100644 --- a/server.js +++ b/server.js @@ -58,8 +58,8 @@ passport.use(new SamlStrategy( decryptionPvk: fs.readFileSync('./backend/facelect.capping.ecrl.marist.edu.pem', 'utf-8'), privateCert: fs.readFileSync('./backend/2024_facelect.capping.ecrl.marist.edu.pem', 'utf-8'), idpCert: fs.readFileSync('./backend/idp_cert.pem', 'utf-8'), - wantAssertionsSigned: true, - wantAuthnResponseSigned: true, + authnContext: ['http://schemas.microsoft.com/ws/2008/06/identity/authenticationmethod/windows'], + identifierFormat: null }, (profile, done) => { // Extract user information from the profile @@ -79,7 +79,7 @@ passport.deserializeUser((user, done) => { }); // SSO callback route -app.get( +app.post( '/login/callback', bodyParser.urlencoded({ extended: false }), passport.authenticate("saml", { From b5581aa452535fd1990f1cbfce3798e7b7aac1a6 Mon Sep 17 00:00:00 2001 From: Brendon Kupsch Date: Fri, 6 Dec 2024 22:55:20 -0500 Subject: [PATCH 121/163] reinstalled node modules --- package-lock.json | 180 +++++----------------------------------------- package.json | 1 - 2 files changed, 19 insertions(+), 162 deletions(-) diff --git a/package-lock.json b/package-lock.json index ecd36b1..6413c76 100644 --- a/package-lock.json +++ b/package-lock.json @@ -29,7 +29,6 @@ "fs": "^0.0.1-security", "morgan": "^1.10.0", "passport": "^0.7.0", - "passport-saml": "^3.2.4", "pg": "^8.13.0", "react": "^18.3.1", "react-dom": "^18.3.1", @@ -4979,16 +4978,6 @@ "node": ">= 16" } }, - "node_modules/@xmldom/xmldom": { - "version": "0.7.13", - "resolved": "https://registry.npmjs.org/@xmldom/xmldom/-/xmldom-0.7.13.tgz", - "integrity": "sha512-lm2GW5PkosIzccsaZIz7tp8cPADSIlIHWDFTR1N0SzfinhhYgeIQjFMz4rYzanCScr3DqQLeomUDArp6MWKm+g==", - "deprecated": "this version is no longer supported, please update to at least 0.8.*", - "license": "MIT", - "engines": { - "node": ">=10.0.0" - } - }, "node_modules/@xtuc/ieee754": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/@xtuc/ieee754/-/ieee754-1.2.0.tgz", @@ -8562,9 +8551,9 @@ } }, "node_modules/express": { - "version": "4.21.1", - "resolved": "https://registry.npmjs.org/express/-/express-4.21.1.tgz", - "integrity": "sha512-YSFlK1Ee0/GC8QaO91tHcDxJiE/X4FbpAyQWkxAvG6AXCuR65YzK8ua6D9hvi/TzUfZMpc+BwuM1IPw8fmQBiQ==", + "version": "4.21.2", + "resolved": "https://registry.npmjs.org/express/-/express-4.21.2.tgz", + "integrity": "sha512-28HqgMZAmih1Czt9ny7qr6ek2qddF4FclbMzwhCREB6OFfH+rXAnuNCwo1/wFvrtbgsQDb4kSbX9de9lFbrXnA==", "license": "MIT", "dependencies": { "accepts": "~1.3.8", @@ -8586,7 +8575,7 @@ "methods": "~1.1.2", "on-finished": "2.4.1", "parseurl": "~1.3.3", - "path-to-regexp": "0.1.10", + "path-to-regexp": "0.1.12", "proxy-addr": "~2.0.7", "qs": "6.13.0", "range-parser": "~1.2.1", @@ -8601,6 +8590,10 @@ }, "engines": { "node": ">= 0.10.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/express" } }, "node_modules/express-session": { @@ -13640,25 +13633,6 @@ "url": "https://github.com/sponsors/jaredhanson" } }, - "node_modules/passport-saml": { - "version": "3.2.4", - "resolved": "https://registry.npmjs.org/passport-saml/-/passport-saml-3.2.4.tgz", - "integrity": "sha512-JSgkFXeaexLNQh1RrOvJAgjLnZzH/S3HbX/mWAk+i7aulnjqUe7WKnPl1NPnJWqP7Dqsv0I2Xm6KIFHkftk0HA==", - "deprecated": "For versions >= 4, please use scopped package @node-saml/passport-saml", - "license": "MIT", - "dependencies": { - "@xmldom/xmldom": "^0.7.6", - "debug": "^4.3.2", - "passport-strategy": "^1.0.0", - "xml-crypto": "^2.1.3", - "xml-encryption": "^2.0.0", - "xml2js": "^0.4.23", - "xmlbuilder": "^15.1.1" - }, - "engines": { - "node": ">= 12" - } - }, "node_modules/passport-strategy": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/passport-strategy/-/passport-strategy-1.0.0.tgz", @@ -13717,9 +13691,10 @@ "integrity": "sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ==" }, "node_modules/path-to-regexp": { - "version": "0.1.10", - "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.10.tgz", - "integrity": "sha512-7lf7qcQidTku0Gu3YDPc8DJ1q7OOucfa/BSsIwjuh56VU7katFvuM8hULfkwB3Fns/rsVF7PwPKVw1sl5KQS9w==" + "version": "0.1.12", + "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.12.tgz", + "integrity": "sha512-RA1GjUVMnvYFxuqovrEqZoxxW5NUZqbwKtYz/Tt7nXerk0LbLblQmrsgdeOxV5SFHf0UDggjS/bSeOZwt1pmEQ==", + "license": "MIT" }, "node_modules/path-type": { "version": "4.0.0", @@ -18996,60 +18971,11 @@ } } }, - "node_modules/xml-crypto": { - "version": "2.1.5", - "resolved": "https://registry.npmjs.org/xml-crypto/-/xml-crypto-2.1.5.tgz", - "integrity": "sha512-xOSJmGFm+BTXmaPYk8pPV3duKo6hJuZ5niN4uMzoNcTlwYs0jAu/N3qY+ud9MhE4N7eMRuC1ayC7Yhmb7MmAWg==", - "license": "MIT", - "dependencies": { - "@xmldom/xmldom": "^0.7.9", - "xpath": "0.0.32" - }, - "engines": { - "node": ">=0.4.0" - } - }, - "node_modules/xml-encryption": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/xml-encryption/-/xml-encryption-2.0.0.tgz", - "integrity": "sha512-4Av83DdvAgUQQMfi/w8G01aJshbEZP9ewjmZMpS9t3H+OCZBDvyK4GJPnHGfWiXlArnPbYvR58JB9qF2x9Ds+Q==", - "license": "MIT", - "dependencies": { - "@xmldom/xmldom": "^0.7.0", - "escape-html": "^1.0.3", - "xpath": "0.0.32" - }, - "engines": { - "node": ">=12" - } - }, "node_modules/xml-name-validator": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/xml-name-validator/-/xml-name-validator-3.0.0.tgz", "integrity": "sha512-A5CUptxDsvxKJEU3yO6DuWBSJz/qizqzJKOMIfUJHETbBw/sFaDxgd6fxm1ewUaM0jZ444Fc5vC5ROYurg/4Pw==" }, - "node_modules/xml2js": { - "version": "0.4.23", - "resolved": "https://registry.npmjs.org/xml2js/-/xml2js-0.4.23.tgz", - "integrity": "sha512-ySPiMjM0+pLDftHgXY4By0uswI3SPKLDw/i3UXbnO8M/p28zqexCUoPmQFrYD+/1BzhGJSs2i1ERWKJAtiLrug==", - "license": "MIT", - "dependencies": { - "sax": ">=0.6.0", - "xmlbuilder": "~11.0.0" - }, - "engines": { - "node": ">=4.0.0" - } - }, - "node_modules/xml2js/node_modules/xmlbuilder": { - "version": "11.0.1", - "resolved": "https://registry.npmjs.org/xmlbuilder/-/xmlbuilder-11.0.1.tgz", - "integrity": "sha512-fDlsI/kFEx7gLvbecc0/ohLG50fugQp8ryHzMTuW9vSa1GJ0XYWKnhsUx7oie3G98+r56aTQIUB4kht42R3JvA==", - "license": "MIT", - "engines": { - "node": ">=4.0" - } - }, "node_modules/xmlbuilder": { "version": "15.1.1", "resolved": "https://registry.npmjs.org/xmlbuilder/-/xmlbuilder-15.1.1.tgz", @@ -19064,15 +18990,6 @@ "resolved": "https://registry.npmjs.org/xmlchars/-/xmlchars-2.2.0.tgz", "integrity": "sha512-JZnDKK8B0RCDw84FNdDAIpZK+JuJw+s7Lz8nksI7SIuU3UXJJslUthsi+uWBUYOwPFwW7W7PRLRfUKpxjtjFCw==" }, - "node_modules/xpath": { - "version": "0.0.32", - "resolved": "https://registry.npmjs.org/xpath/-/xpath-0.0.32.tgz", - "integrity": "sha512-rxMJhSIoiO8vXcWvSifKqhvV96GjiD5wYb8/QHdoRyQvraTpp4IEv944nhGausZZ3u7dhQXteZuZbaqfpB7uYw==", - "license": "MIT", - "engines": { - "node": ">=0.6.0" - } - }, "node_modules/xtend": { "version": "4.0.2", "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz", @@ -22593,11 +22510,6 @@ "resolved": "https://registry.npmjs.org/@xmldom/is-dom-node/-/is-dom-node-1.0.1.tgz", "integrity": "sha512-CJDxIgE5I0FH+ttq/Fxy6nRpxP70+e2O048EPe85J2use3XKdatVM7dDVvFNjQudd9B49NPoZ+8PG49zj4Er8Q==" }, - "@xmldom/xmldom": { - "version": "0.7.13", - "resolved": "https://registry.npmjs.org/@xmldom/xmldom/-/xmldom-0.7.13.tgz", - "integrity": "sha512-lm2GW5PkosIzccsaZIz7tp8cPADSIlIHWDFTR1N0SzfinhhYgeIQjFMz4rYzanCScr3DqQLeomUDArp6MWKm+g==" - }, "@xtuc/ieee754": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/@xtuc/ieee754/-/ieee754-1.2.0.tgz", @@ -25146,9 +25058,9 @@ } }, "express": { - "version": "4.21.1", - "resolved": "https://registry.npmjs.org/express/-/express-4.21.1.tgz", - "integrity": "sha512-YSFlK1Ee0/GC8QaO91tHcDxJiE/X4FbpAyQWkxAvG6AXCuR65YzK8ua6D9hvi/TzUfZMpc+BwuM1IPw8fmQBiQ==", + "version": "4.21.2", + "resolved": "https://registry.npmjs.org/express/-/express-4.21.2.tgz", + "integrity": "sha512-28HqgMZAmih1Czt9ny7qr6ek2qddF4FclbMzwhCREB6OFfH+rXAnuNCwo1/wFvrtbgsQDb4kSbX9de9lFbrXnA==", "requires": { "accepts": "~1.3.8", "array-flatten": "1.1.1", @@ -25169,7 +25081,7 @@ "methods": "~1.1.2", "on-finished": "2.4.1", "parseurl": "~1.3.3", - "path-to-regexp": "0.1.10", + "path-to-regexp": "0.1.12", "proxy-addr": "~2.0.7", "qs": "6.13.0", "range-parser": "~1.2.1", @@ -28790,20 +28702,6 @@ "utils-merge": "^1.0.1" } }, - "passport-saml": { - "version": "3.2.4", - "resolved": "https://registry.npmjs.org/passport-saml/-/passport-saml-3.2.4.tgz", - "integrity": "sha512-JSgkFXeaexLNQh1RrOvJAgjLnZzH/S3HbX/mWAk+i7aulnjqUe7WKnPl1NPnJWqP7Dqsv0I2Xm6KIFHkftk0HA==", - "requires": { - "@xmldom/xmldom": "^0.7.6", - "debug": "^4.3.2", - "passport-strategy": "^1.0.0", - "xml-crypto": "^2.1.3", - "xml-encryption": "^2.0.0", - "xml2js": "^0.4.23", - "xmlbuilder": "^15.1.1" - } - }, "passport-strategy": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/passport-strategy/-/passport-strategy-1.0.0.tgz", @@ -28846,9 +28744,9 @@ } }, "path-to-regexp": { - "version": "0.1.10", - "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.10.tgz", - "integrity": "sha512-7lf7qcQidTku0Gu3YDPc8DJ1q7OOucfa/BSsIwjuh56VU7katFvuM8hULfkwB3Fns/rsVF7PwPKVw1sl5KQS9w==" + "version": "0.1.12", + "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.12.tgz", + "integrity": "sha512-RA1GjUVMnvYFxuqovrEqZoxxW5NUZqbwKtYz/Tt7nXerk0LbLblQmrsgdeOxV5SFHf0UDggjS/bSeOZwt1pmEQ==" }, "path-type": { "version": "4.0.0", @@ -32510,46 +32408,11 @@ "integrity": "sha512-+dbF1tHwZpXcbOJdVOkzLDxZP1ailvSxM6ZweXTegylPny803bFhA+vqBYw4s31NSAk4S2Qz+AKXK9a4wkdjcQ==", "requires": {} }, - "xml-crypto": { - "version": "2.1.5", - "resolved": "https://registry.npmjs.org/xml-crypto/-/xml-crypto-2.1.5.tgz", - "integrity": "sha512-xOSJmGFm+BTXmaPYk8pPV3duKo6hJuZ5niN4uMzoNcTlwYs0jAu/N3qY+ud9MhE4N7eMRuC1ayC7Yhmb7MmAWg==", - "requires": { - "@xmldom/xmldom": "^0.7.9", - "xpath": "0.0.32" - } - }, - "xml-encryption": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/xml-encryption/-/xml-encryption-2.0.0.tgz", - "integrity": "sha512-4Av83DdvAgUQQMfi/w8G01aJshbEZP9ewjmZMpS9t3H+OCZBDvyK4GJPnHGfWiXlArnPbYvR58JB9qF2x9Ds+Q==", - "requires": { - "@xmldom/xmldom": "^0.7.0", - "escape-html": "^1.0.3", - "xpath": "0.0.32" - } - }, "xml-name-validator": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/xml-name-validator/-/xml-name-validator-3.0.0.tgz", "integrity": "sha512-A5CUptxDsvxKJEU3yO6DuWBSJz/qizqzJKOMIfUJHETbBw/sFaDxgd6fxm1ewUaM0jZ444Fc5vC5ROYurg/4Pw==" }, - "xml2js": { - "version": "0.4.23", - "resolved": "https://registry.npmjs.org/xml2js/-/xml2js-0.4.23.tgz", - "integrity": "sha512-ySPiMjM0+pLDftHgXY4By0uswI3SPKLDw/i3UXbnO8M/p28zqexCUoPmQFrYD+/1BzhGJSs2i1ERWKJAtiLrug==", - "requires": { - "sax": ">=0.6.0", - "xmlbuilder": "~11.0.0" - }, - "dependencies": { - "xmlbuilder": { - "version": "11.0.1", - "resolved": "https://registry.npmjs.org/xmlbuilder/-/xmlbuilder-11.0.1.tgz", - "integrity": "sha512-fDlsI/kFEx7gLvbecc0/ohLG50fugQp8ryHzMTuW9vSa1GJ0XYWKnhsUx7oie3G98+r56aTQIUB4kht42R3JvA==" - } - } - }, "xmlbuilder": { "version": "15.1.1", "resolved": "https://registry.npmjs.org/xmlbuilder/-/xmlbuilder-15.1.1.tgz", @@ -32560,11 +32423,6 @@ "resolved": "https://registry.npmjs.org/xmlchars/-/xmlchars-2.2.0.tgz", "integrity": "sha512-JZnDKK8B0RCDw84FNdDAIpZK+JuJw+s7Lz8nksI7SIuU3UXJJslUthsi+uWBUYOwPFwW7W7PRLRfUKpxjtjFCw==" }, - "xpath": { - "version": "0.0.32", - "resolved": "https://registry.npmjs.org/xpath/-/xpath-0.0.32.tgz", - "integrity": "sha512-rxMJhSIoiO8vXcWvSifKqhvV96GjiD5wYb8/QHdoRyQvraTpp4IEv944nhGausZZ3u7dhQXteZuZbaqfpB7uYw==" - }, "xtend": { "version": "4.0.2", "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz", diff --git a/package.json b/package.json index 55dfa24..e5d3d0e 100644 --- a/package.json +++ b/package.json @@ -24,7 +24,6 @@ "fs": "^0.0.1-security", "morgan": "^1.10.0", "passport": "^0.7.0", - "passport-saml": "^3.2.4", "pg": "^8.13.0", "react": "^18.3.1", "react-dom": "^18.3.1", From ef3bd3547f1b2fda275cf21dff78bc0201b2aa52 Mon Sep 17 00:00:00 2001 From: Brendon Kupsch Date: Fri, 6 Dec 2024 23:04:33 -0500 Subject: [PATCH 122/163] removed saml conf test --- server.js | 2 -- 1 file changed, 2 deletions(-) diff --git a/server.js b/server.js index b13e074..090821d 100644 --- a/server.js +++ b/server.js @@ -58,8 +58,6 @@ passport.use(new SamlStrategy( decryptionPvk: fs.readFileSync('./backend/facelect.capping.ecrl.marist.edu.pem', 'utf-8'), privateCert: fs.readFileSync('./backend/2024_facelect.capping.ecrl.marist.edu.pem', 'utf-8'), idpCert: fs.readFileSync('./backend/idp_cert.pem', 'utf-8'), - authnContext: ['http://schemas.microsoft.com/ws/2008/06/identity/authenticationmethod/windows'], - identifierFormat: null }, (profile, done) => { // Extract user information from the profile From b4e0257c6ba6c940c5d2d9d27658a1752ab30279 Mon Sep 17 00:00:00 2001 From: Brendon Kupsch Date: Sat, 7 Dec 2024 03:46:07 -0500 Subject: [PATCH 123/163] changed saml config --- server.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/server.js b/server.js index 090821d..bcfee8b 100644 --- a/server.js +++ b/server.js @@ -52,12 +52,17 @@ const hashPassword = (password) => { passport.use(new SamlStrategy( { callbackUrl: 'https://facelect.capping.ecrl.marist.edu/login/callback', - path: '/login/callback', entryPoint: 'https://auth.it.marist.edu/idp/profile/SAML2/Redirect/SSO', issuer: 'https://facelect.capping.ecrl.marist.edu', + privateKey: fs.readFileSync('./backend/facelect.capping.ecrl.marist.edu.pem', 'utf-8'), decryptionPvk: fs.readFileSync('./backend/facelect.capping.ecrl.marist.edu.pem', 'utf-8'), privateCert: fs.readFileSync('./backend/2024_facelect.capping.ecrl.marist.edu.pem', 'utf-8'), idpCert: fs.readFileSync('./backend/idp_cert.pem', 'utf-8'), + cert: fs.readFileSync('./backend/idp_cert.pem', 'utf-8'), + identifierFormat: 'urn:oasis:names:tc:SAML:2.0:nameid-format:transient', + authnRequestBinding: 'HTTP-REDIRECT', + protocol: 'https://', + signatureAlgorithm: 'sha256', }, (profile, done) => { // Extract user information from the profile From 885b533f7a9d65495d122f83901dfeb75aaf65dc Mon Sep 17 00:00:00 2001 From: Brendon Kupsch Date: Sat, 7 Dec 2024 03:48:27 -0500 Subject: [PATCH 124/163] saml changes --- server.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/server.js b/server.js index bcfee8b..6c8ad26 100644 --- a/server.js +++ b/server.js @@ -61,8 +61,7 @@ passport.use(new SamlStrategy( cert: fs.readFileSync('./backend/idp_cert.pem', 'utf-8'), identifierFormat: 'urn:oasis:names:tc:SAML:2.0:nameid-format:transient', authnRequestBinding: 'HTTP-REDIRECT', - protocol: 'https://', - signatureAlgorithm: 'sha256', + // protocol: 'https://', }, (profile, done) => { // Extract user information from the profile From ecb8fc1ef02c5894a57cc816051df7a8fc769bd2 Mon Sep 17 00:00:00 2001 From: Brendon Kupsch Date: Sat, 7 Dec 2024 03:49:31 -0500 Subject: [PATCH 125/163] saml changes --- server.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server.js b/server.js index 6c8ad26..d96f3e7 100644 --- a/server.js +++ b/server.js @@ -59,8 +59,8 @@ passport.use(new SamlStrategy( privateCert: fs.readFileSync('./backend/2024_facelect.capping.ecrl.marist.edu.pem', 'utf-8'), idpCert: fs.readFileSync('./backend/idp_cert.pem', 'utf-8'), cert: fs.readFileSync('./backend/idp_cert.pem', 'utf-8'), - identifierFormat: 'urn:oasis:names:tc:SAML:2.0:nameid-format:transient', - authnRequestBinding: 'HTTP-REDIRECT', + // identifierFormat: 'urn:oasis:names:tc:SAML:2.0:nameid-format:transient', + // authnRequestBinding: 'HTTP-REDIRECT', // protocol: 'https://', }, (profile, done) => { From e044dff774e3f5c0a135ed2df762c2e0dee228ba Mon Sep 17 00:00:00 2001 From: Brendon Kupsch Date: Sat, 7 Dec 2024 03:50:27 -0500 Subject: [PATCH 126/163] saml changes --- server.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server.js b/server.js index d96f3e7..2f6cd51 100644 --- a/server.js +++ b/server.js @@ -54,11 +54,11 @@ passport.use(new SamlStrategy( callbackUrl: 'https://facelect.capping.ecrl.marist.edu/login/callback', entryPoint: 'https://auth.it.marist.edu/idp/profile/SAML2/Redirect/SSO', issuer: 'https://facelect.capping.ecrl.marist.edu', - privateKey: fs.readFileSync('./backend/facelect.capping.ecrl.marist.edu.pem', 'utf-8'), + // privateKey: fs.readFileSync('./backend/facelect.capping.ecrl.marist.edu.pem', 'utf-8'), decryptionPvk: fs.readFileSync('./backend/facelect.capping.ecrl.marist.edu.pem', 'utf-8'), privateCert: fs.readFileSync('./backend/2024_facelect.capping.ecrl.marist.edu.pem', 'utf-8'), idpCert: fs.readFileSync('./backend/idp_cert.pem', 'utf-8'), - cert: fs.readFileSync('./backend/idp_cert.pem', 'utf-8'), + // cert: fs.readFileSync('./backend/idp_cert.pem', 'utf-8'), // identifierFormat: 'urn:oasis:names:tc:SAML:2.0:nameid-format:transient', // authnRequestBinding: 'HTTP-REDIRECT', // protocol: 'https://', From 148f59704168d05f2abc52f27481a79bfdff4724 Mon Sep 17 00:00:00 2001 From: Brendon Kupsch Date: Sat, 7 Dec 2024 04:19:20 -0500 Subject: [PATCH 127/163] saml test --- server.js | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/server.js b/server.js index 2f6cd51..5a8447c 100644 --- a/server.js +++ b/server.js @@ -54,14 +54,9 @@ passport.use(new SamlStrategy( callbackUrl: 'https://facelect.capping.ecrl.marist.edu/login/callback', entryPoint: 'https://auth.it.marist.edu/idp/profile/SAML2/Redirect/SSO', issuer: 'https://facelect.capping.ecrl.marist.edu', - // privateKey: fs.readFileSync('./backend/facelect.capping.ecrl.marist.edu.pem', 'utf-8'), decryptionPvk: fs.readFileSync('./backend/facelect.capping.ecrl.marist.edu.pem', 'utf-8'), privateCert: fs.readFileSync('./backend/2024_facelect.capping.ecrl.marist.edu.pem', 'utf-8'), idpCert: fs.readFileSync('./backend/idp_cert.pem', 'utf-8'), - // cert: fs.readFileSync('./backend/idp_cert.pem', 'utf-8'), - // identifierFormat: 'urn:oasis:names:tc:SAML:2.0:nameid-format:transient', - // authnRequestBinding: 'HTTP-REDIRECT', - // protocol: 'https://', }, (profile, done) => { // Extract user information from the profile @@ -81,7 +76,7 @@ passport.deserializeUser((user, done) => { }); // SSO callback route -app.post( +app.get( '/login/callback', bodyParser.urlencoded({ extended: false }), passport.authenticate("saml", { From 813667eae7355b2c99f5fdb49a1f4e2d1b53578a Mon Sep 17 00:00:00 2001 From: Brendon Kupsch Date: Sat, 7 Dec 2024 04:21:47 -0500 Subject: [PATCH 128/163] post changes --- server.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server.js b/server.js index 5a8447c..278991d 100644 --- a/server.js +++ b/server.js @@ -76,8 +76,8 @@ passport.deserializeUser((user, done) => { }); // SSO callback route -app.get( - '/login/callback', +app.post( + 'https://facelect.capping.ecrl.marist.edu/login/callback', bodyParser.urlencoded({ extended: false }), passport.authenticate("saml", { failureRedirect: "/", From f62e24be7866fa281be7199b248d69ed551df2e4 Mon Sep 17 00:00:00 2001 From: Brendon Kupsch Date: Sat, 7 Dec 2024 04:37:55 -0500 Subject: [PATCH 129/163] session middleware change --- server.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/server.js b/server.js index 278991d..5cd6e19 100644 --- a/server.js +++ b/server.js @@ -29,11 +29,10 @@ app.use(morgan('common')); // Log HTTP requests // Configure session middleware app.use(session({ - // secret: 'Faculty%Defeat$248902', secret: 'your-secret-key', resave: false, saveUninitialized: true, - cookie: { secure: process.env.NODE_ENV === 'production' } // Ensure cookies are only used over HTTPS in production + // cookie: { secure: process.env.NODE_ENV === 'production' } // Ensure cookies are only used over HTTPS in production })); // Initialize Passport and restore authentication state, if any, from the session From 4b0789b9c099f9bb06c1606c77d7dc4cb7522f95 Mon Sep 17 00:00:00 2001 From: Brendon Kupsch Date: Sat, 7 Dec 2024 04:50:15 -0500 Subject: [PATCH 130/163] post changes --- server.js | 1 + 1 file changed, 1 insertion(+) diff --git a/server.js b/server.js index 5cd6e19..809814b 100644 --- a/server.js +++ b/server.js @@ -83,6 +83,7 @@ app.post( failureFlash: true, }), function (req, res) { + done(null, user); res.redirect("/user-profile"); }, ); From b58672b8e892508a0d2b2759c035c9e7c6709c73 Mon Sep 17 00:00:00 2001 From: Brendon Kupsch Date: Sat, 7 Dec 2024 04:52:50 -0500 Subject: [PATCH 131/163] post changes --- server.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/server.js b/server.js index 809814b..5eb8c33 100644 --- a/server.js +++ b/server.js @@ -76,14 +76,13 @@ passport.deserializeUser((user, done) => { // SSO callback route app.post( - 'https://facelect.capping.ecrl.marist.edu/login/callback', + 'https://facelect.capping.ecrl.marist.edu/auth/login/callback', bodyParser.urlencoded({ extended: false }), passport.authenticate("saml", { failureRedirect: "/", failureFlash: true, }), function (req, res) { - done(null, user); res.redirect("/user-profile"); }, ); From 63c3cf04fdfaf6f0d901e1bc8787686d6d0d6ea7 Mon Sep 17 00:00:00 2001 From: Brendon Kupsch Date: Sat, 7 Dec 2024 04:54:12 -0500 Subject: [PATCH 132/163] final commit for tn --- server.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server.js b/server.js index 5eb8c33..5cd6e19 100644 --- a/server.js +++ b/server.js @@ -76,7 +76,7 @@ passport.deserializeUser((user, done) => { // SSO callback route app.post( - 'https://facelect.capping.ecrl.marist.edu/auth/login/callback', + 'https://facelect.capping.ecrl.marist.edu/login/callback', bodyParser.urlencoded({ extended: false }), passport.authenticate("saml", { failureRedirect: "/", From d09512f3718fc9160afedbe32ba38689ce0cb870 Mon Sep 17 00:00:00 2001 From: Brendon Kupsch <98063893+BrendonKupsch1@users.noreply.github.com> Date: Sat, 7 Dec 2024 14:07:37 -0500 Subject: [PATCH 133/163] testing replacing all ports with 3000 --- server.js | 6 +++--- src/AdminLogin.tsx | 2 +- src/AdminView.tsx | 2 +- src/Login.tsx | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/server.js b/server.js index 5cd6e19..b22d7b4 100644 --- a/server.js +++ b/server.js @@ -153,7 +153,7 @@ const options = { ca: fs.readFileSync('./backend/2024_InCommonCA.crt'), }; -// Create HTTPS server on port 3001 -https.createServer(options, app).listen(3001, () => { - console.log('HTTPS Server running on port 3001'); +// Create HTTPS server on port 3000 +https.createServer(options, app).listen(3000, () => { + console.log('HTTPS Server running on port 3000'); }); diff --git a/src/AdminLogin.tsx b/src/AdminLogin.tsx index 27341a1..09d3067 100644 --- a/src/AdminLogin.tsx +++ b/src/AdminLogin.tsx @@ -18,7 +18,7 @@ const AdminLogin: React.FC = () => { e.preventDefault(); try { console.log("login submitted"); - const response = await fetch('https://facelect.capping.ecrl.marist.edu:3001/admin-login', { + const response = await fetch('https://facelect.capping.ecrl.marist.edu:3000/admin-login', { method: 'POST', headers: { 'Content-Type': 'application/json', diff --git a/src/AdminView.tsx b/src/AdminView.tsx index 898c9e4..fea8acb 100644 --- a/src/AdminView.tsx +++ b/src/AdminView.tsx @@ -87,7 +87,7 @@ const App: React.FC = () => { useEffect(() => { - fetch('https://facelect.capping.ecrl.marist.edu:3001/faculty') + fetch('https://facelect.capping.ecrl.marist.edu:3000/faculty') .then(response => response.json()) .then(data => setRowData(data)) .catch(error => console.error('Error fetching data:', error)); diff --git a/src/Login.tsx b/src/Login.tsx index fedbd53..542c07a 100644 --- a/src/Login.tsx +++ b/src/Login.tsx @@ -6,7 +6,7 @@ import Footer from './components/footer/footer'; function handleSSOLogin() { console.log('going to the /login') - window.location.href = 'https://facelect.capping.ecrl.marist.edu:3001/sso/login'; + window.location.href = 'https://facelect.capping.ecrl.marist.edu:3000/sso/login'; } From 22ee0535ee9af3a798408e5064ba78e08055391a Mon Sep 17 00:00:00 2001 From: Brendon Kupsch <98063893+BrendonKupsch1@users.noreply.github.com> Date: Sat, 7 Dec 2024 14:09:23 -0500 Subject: [PATCH 134/163] updated post path --- server.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server.js b/server.js index b22d7b4..daf1c3b 100644 --- a/server.js +++ b/server.js @@ -76,7 +76,7 @@ passport.deserializeUser((user, done) => { // SSO callback route app.post( - 'https://facelect.capping.ecrl.marist.edu/login/callback', + '/login/callback', bodyParser.urlencoded({ extended: false }), passport.authenticate("saml", { failureRedirect: "/", From 8a83cb9b3b66d7da58c55e64c0b4274fee430351 Mon Sep 17 00:00:00 2001 From: Brendon Kupsch <98063893+BrendonKupsch1@users.noreply.github.com> Date: Sat, 7 Dec 2024 14:10:11 -0500 Subject: [PATCH 135/163] Revert "testing replacing all ports with 3000" This reverts commit d09512f3718fc9160afedbe32ba38689ce0cb870. --- server.js | 6 +++--- src/AdminLogin.tsx | 2 +- src/AdminView.tsx | 2 +- src/Login.tsx | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/server.js b/server.js index daf1c3b..0851a1f 100644 --- a/server.js +++ b/server.js @@ -153,7 +153,7 @@ const options = { ca: fs.readFileSync('./backend/2024_InCommonCA.crt'), }; -// Create HTTPS server on port 3000 -https.createServer(options, app).listen(3000, () => { - console.log('HTTPS Server running on port 3000'); +// Create HTTPS server on port 3001 +https.createServer(options, app).listen(3001, () => { + console.log('HTTPS Server running on port 3001'); }); diff --git a/src/AdminLogin.tsx b/src/AdminLogin.tsx index 09d3067..27341a1 100644 --- a/src/AdminLogin.tsx +++ b/src/AdminLogin.tsx @@ -18,7 +18,7 @@ const AdminLogin: React.FC = () => { e.preventDefault(); try { console.log("login submitted"); - const response = await fetch('https://facelect.capping.ecrl.marist.edu:3000/admin-login', { + const response = await fetch('https://facelect.capping.ecrl.marist.edu:3001/admin-login', { method: 'POST', headers: { 'Content-Type': 'application/json', diff --git a/src/AdminView.tsx b/src/AdminView.tsx index fea8acb..898c9e4 100644 --- a/src/AdminView.tsx +++ b/src/AdminView.tsx @@ -87,7 +87,7 @@ const App: React.FC = () => { useEffect(() => { - fetch('https://facelect.capping.ecrl.marist.edu:3000/faculty') + fetch('https://facelect.capping.ecrl.marist.edu:3001/faculty') .then(response => response.json()) .then(data => setRowData(data)) .catch(error => console.error('Error fetching data:', error)); diff --git a/src/Login.tsx b/src/Login.tsx index 542c07a..fedbd53 100644 --- a/src/Login.tsx +++ b/src/Login.tsx @@ -6,7 +6,7 @@ import Footer from './components/footer/footer'; function handleSSOLogin() { console.log('going to the /login') - window.location.href = 'https://facelect.capping.ecrl.marist.edu:3000/sso/login'; + window.location.href = 'https://facelect.capping.ecrl.marist.edu:3001/sso/login'; } From fe631a04ac4cbb44ebd44e63804dcc14d04750a8 Mon Sep 17 00:00:00 2001 From: Brendon Kupsch Date: Sat, 7 Dec 2024 18:15:44 -0500 Subject: [PATCH 136/163] removing apache, just using node --- server.js | 13 ++++++++++--- src/AdminLogin.tsx | 2 +- src/AdminView.tsx | 2 +- src/Login.tsx | 2 +- 4 files changed, 13 insertions(+), 6 deletions(-) diff --git a/server.js b/server.js index 0851a1f..8dd00ff 100644 --- a/server.js +++ b/server.js @@ -11,6 +11,8 @@ const session = require('express-session'); const bodyParser = require("body-parser"); const morgan = require('morgan'); +const httpPort = 8080; +const httpsPort = 8443; const app = express(); @@ -154,6 +156,11 @@ const options = { }; // Create HTTPS server on port 3001 -https.createServer(options, app).listen(3001, () => { - console.log('HTTPS Server running on port 3001'); -}); +// https.createServer(options, app).listen(3001, () => { +// console.log('HTTPS Server running on port 3001'); +// }); + +// create http nad https server +https.createServer(options, app).listen(httpsPort, () => { + console.log(`HTTPS Server running on port ${httpsPort}`); +}); \ No newline at end of file diff --git a/src/AdminLogin.tsx b/src/AdminLogin.tsx index 27341a1..e74d3b5 100644 --- a/src/AdminLogin.tsx +++ b/src/AdminLogin.tsx @@ -18,7 +18,7 @@ const AdminLogin: React.FC = () => { e.preventDefault(); try { console.log("login submitted"); - const response = await fetch('https://facelect.capping.ecrl.marist.edu:3001/admin-login', { + const response = await fetch('https://facelect.capping.ecrl.marist.edu/admin-login', { method: 'POST', headers: { 'Content-Type': 'application/json', diff --git a/src/AdminView.tsx b/src/AdminView.tsx index 898c9e4..e6d6d95 100644 --- a/src/AdminView.tsx +++ b/src/AdminView.tsx @@ -87,7 +87,7 @@ const App: React.FC = () => { useEffect(() => { - fetch('https://facelect.capping.ecrl.marist.edu:3001/faculty') + fetch('https://facelect.capping.ecrl.marist.edu/faculty') .then(response => response.json()) .then(data => setRowData(data)) .catch(error => console.error('Error fetching data:', error)); diff --git a/src/Login.tsx b/src/Login.tsx index fedbd53..a744c3b 100644 --- a/src/Login.tsx +++ b/src/Login.tsx @@ -6,7 +6,7 @@ import Footer from './components/footer/footer'; function handleSSOLogin() { console.log('going to the /login') - window.location.href = 'https://facelect.capping.ecrl.marist.edu:3001/sso/login'; + window.location.href = 'https://facelect.capping.ecrl.marist.edu/sso/login'; } From 4405ab382ba66986305667966ea81560e537e588 Mon Sep 17 00:00:00 2001 From: Brendon Kupsch Date: Sat, 7 Dec 2024 18:27:36 -0500 Subject: [PATCH 137/163] modifying server values --- server.js | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/server.js b/server.js index 8dd00ff..bdd1265 100644 --- a/server.js +++ b/server.js @@ -160,7 +160,14 @@ const options = { // console.log('HTTPS Server running on port 3001'); // }); -// create http nad https server -https.createServer(options, app).listen(httpsPort, () => { +// create servers +const httpServer = http.createServer(app); +const httpsServer = https.createServer(options, app); + +// start servers +httpServer.listen(httpPort, () => { + console.log(`HTTP Server running on port ${httpPort}`); +}); +httpsServer.listen(httpsPort, () => { console.log(`HTTPS Server running on port ${httpsPort}`); }); \ No newline at end of file From 35b3b6998d155af23b7bb6dec9e9999a235095bb Mon Sep 17 00:00:00 2001 From: Brendon Kupsch Date: Sat, 7 Dec 2024 18:30:08 -0500 Subject: [PATCH 138/163] add require http --- server.js | 1 + 1 file changed, 1 insertion(+) diff --git a/server.js b/server.js index bdd1265..3b913ba 100644 --- a/server.js +++ b/server.js @@ -3,6 +3,7 @@ const express = require('express'); const cors = require('cors'); const crypto = require('crypto'); // Import the crypto module const { client, connectDB } = require('./db/connection'); // Import the client and connectDB +const http = require('http'); const https = require('https'); const fs = require('fs'); const passport = require('passport'); From cb1f7df2af682d74efc62f11508cf7c515922f70 Mon Sep 17 00:00:00 2001 From: Brendon Kupsch Date: Sat, 7 Dec 2024 18:32:12 -0500 Subject: [PATCH 139/163] Update server.js --- server.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server.js b/server.js index 3b913ba..dc0f05f 100644 --- a/server.js +++ b/server.js @@ -35,7 +35,7 @@ app.use(session({ secret: 'your-secret-key', resave: false, saveUninitialized: true, - // cookie: { secure: process.env.NODE_ENV === 'production' } // Ensure cookies are only used over HTTPS in production + cookie: { secure: process.env.NODE_ENV === 'production' } // Ensure cookies are only used over HTTPS in production })); // Initialize Passport and restore authentication state, if any, from the session From 74c594e821ce26d563a529f07f5c321fc5a8f59e Mon Sep 17 00:00:00 2001 From: Brendon Kupsch Date: Sat, 7 Dec 2024 18:37:47 -0500 Subject: [PATCH 140/163] Update server.js --- server.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/server.js b/server.js index dc0f05f..d816a02 100644 --- a/server.js +++ b/server.js @@ -45,6 +45,11 @@ app.use(passport.session()); // Connect to the PostgreSQL database connectDB(); +// Redirect base URL to /login +app.get('/', (req, res) => { + res.redirect('/login'); +}); + // Function to hash passwords using SHA-256 const hashPassword = (password) => { return crypto.createHash('sha256').update(password).digest('hex'); From f6ce490c9d7e26c24a9be13bc35a9137ffaa594b Mon Sep 17 00:00:00 2001 From: Brendon Kupsch Date: Sat, 7 Dec 2024 18:40:13 -0500 Subject: [PATCH 141/163] adding routes --- server.js | 5 +++++ src/App.tsx | 3 +++ 2 files changed, 8 insertions(+) diff --git a/server.js b/server.js index d816a02..0b35b1d 100644 --- a/server.js +++ b/server.js @@ -50,6 +50,11 @@ app.get('/', (req, res) => { res.redirect('/login'); }); +// Define the /login route +app.get('/login', (req, res) => { + res.send('Login Page'); // Replace this with your actual login page rendering logic +}); + // Function to hash passwords using SHA-256 const hashPassword = (password) => { return crypto.createHash('sha256').update(password).digest('hex'); diff --git a/src/App.tsx b/src/App.tsx index e13d0fa..3168098 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -14,6 +14,9 @@ function App() { {/* Default route for the login page */} } /> + + {/* Other route for the login page */} + } /> {/* Route for the admin login page */} } /> From ada0f1c49f0c2074e5400e9a6577fde28085a1c7 Mon Sep 17 00:00:00 2001 From: Brendon Kupsch Date: Sat, 7 Dec 2024 18:55:01 -0500 Subject: [PATCH 142/163] trying to fix login --- package.json | 2 ++ server.js | 23 ++++++++--------------- src/Login.tsx | 6 +++++- 3 files changed, 15 insertions(+), 16 deletions(-) diff --git a/package.json b/package.json index e5d3d0e..e5813b9 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,8 @@ { "name": "election-capping", "version": "0.1.0", + "main": "server.js", + "proxy": "https://facelect.capping.ecrl.marist.edu:8443" "private": true, "dependencies": { "@node-saml/passport-saml": "^5.0.0", diff --git a/server.js b/server.js index 0b35b1d..2ad6af3 100644 --- a/server.js +++ b/server.js @@ -25,11 +25,12 @@ const allowedOrigins = [ ]; app.use(cors()); - app.use(express.json()); // Parse incoming JSON data - app.use(morgan('common')); // Log HTTP requests +// Connect to the PostgreSQL database +connectDB(); + // Configure session middleware app.use(session({ secret: 'your-secret-key', @@ -42,19 +43,6 @@ app.use(session({ app.use(passport.initialize()); app.use(passport.session()); -// Connect to the PostgreSQL database -connectDB(); - -// Redirect base URL to /login -app.get('/', (req, res) => { - res.redirect('/login'); -}); - -// Define the /login route -app.get('/login', (req, res) => { - res.send('Login Page'); // Replace this with your actual login page rendering logic -}); - // Function to hash passwords using SHA-256 const hashPassword = (password) => { return crypto.createHash('sha256').update(password).digest('hex'); @@ -108,6 +96,11 @@ app.get('/sso/login', }, ); +// Login route +app.get('/login', (req, res) => { + res.send('Login page'); +} + // Route to handle admin login app.post('/admin-login', async (req, res) => { const { username, password } = req.body; // Capture username and password from request diff --git a/src/Login.tsx b/src/Login.tsx index a744c3b..b0f58f2 100644 --- a/src/Login.tsx +++ b/src/Login.tsx @@ -1,9 +1,13 @@ -import React from 'react'; +import React, { useEffect } from 'react'; import './Login.css'; import backgroundImage from './assets/background.jpg'; import logoImage from './assets/logo.png' import Footer from './components/footer/footer'; +useEffect(() => { + fetch('/login') +}) + function handleSSOLogin() { console.log('going to the /login') window.location.href = 'https://facelect.capping.ecrl.marist.edu/sso/login'; From a6171612b3f268fdca72f9e075f63f49f1fd4fd9 Mon Sep 17 00:00:00 2001 From: Brendon Kupsch Date: Sat, 7 Dec 2024 18:56:42 -0500 Subject: [PATCH 143/163] updated package --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index e5813b9..1223684 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "election-capping", "version": "0.1.0", "main": "server.js", - "proxy": "https://facelect.capping.ecrl.marist.edu:8443" + "proxy": "https://facelect.capping.ecrl.marist.edu:8443", "private": true, "dependencies": { "@node-saml/passport-saml": "^5.0.0", From ee6fd227397d0973af2199a11a83c22b225173ad Mon Sep 17 00:00:00 2001 From: Brendon Kupsch Date: Sat, 7 Dec 2024 18:57:37 -0500 Subject: [PATCH 144/163] Update Login.tsx --- src/Login.tsx | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/Login.tsx b/src/Login.tsx index b0f58f2..b43055a 100644 --- a/src/Login.tsx +++ b/src/Login.tsx @@ -4,10 +4,6 @@ import backgroundImage from './assets/background.jpg'; import logoImage from './assets/logo.png' import Footer from './components/footer/footer'; -useEffect(() => { - fetch('/login') -}) - function handleSSOLogin() { console.log('going to the /login') window.location.href = 'https://facelect.capping.ecrl.marist.edu/sso/login'; @@ -15,6 +11,11 @@ function handleSSOLogin() { function Login() { + + useEffect(() => { + fetch('/login') + }) + return (
Background From 0e20eacddbc566a5279a892cce377b94ab199bef Mon Sep 17 00:00:00 2001 From: Brendon Kupsch Date: Sat, 7 Dec 2024 19:01:27 -0500 Subject: [PATCH 145/163] Update server.js --- server.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/server.js b/server.js index 2ad6af3..c7e8f14 100644 --- a/server.js +++ b/server.js @@ -85,7 +85,7 @@ app.post( }), function (req, res) { res.redirect("/user-profile"); - }, + } ); // SSO login route @@ -93,13 +93,14 @@ app.get('/sso/login', passport.authenticate("saml", { failureRedirect: "/", failureFlash: true }), function (req, res) { res.redirect("/"); - }, + } ); // Login route app.get('/login', (req, res) => { res.send('Login page'); -} + } +); // Route to handle admin login app.post('/admin-login', async (req, res) => { From 247f6537bf00b34e684dba1282c55eba61712212 Mon Sep 17 00:00:00 2001 From: Brendon Kupsch Date: Sat, 7 Dec 2024 19:11:49 -0500 Subject: [PATCH 146/163] update package path and backend logic --- idp_metadata.xml | 162 ----------------------------------------------- package.json | 2 +- server.js | 12 ++-- 3 files changed, 9 insertions(+), 167 deletions(-) delete mode 100644 idp_metadata.xml diff --git a/idp_metadata.xml b/idp_metadata.xml deleted file mode 100644 index 2e10895..0000000 --- a/idp_metadata.xml +++ /dev/null @@ -1,162 +0,0 @@ - - - - - - - marist.edu - - - - - - - -MIIDZDCCAkygAwIBAgIEWUPr+jANBgkqhkiG9w0BAQsFADB0MQswCQYDVQQGEwJV -UzELMAkGA1UECAwCTlkxFTATBgNVBAcMDFBvdWdoa2VlcHNpZTEXMBUGA1UECgwO -TWFyaXN0IENvbGxlZ2UxCzAJBgNVBAsMAklUMRswGQYDVQQDDBJhdXRoLml0Lm1h -cmlzdC5lZHUwHhcNMTcwNjE2MTQzNDIzWhcNMjcwNjE2MTQzNDIzWjB0MQswCQYD -VQQGEwJVUzELMAkGA1UECAwCTlk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R0uCQ8fAvLvM6t5igUZLE1FwzNeLSV6ea5A7e828w5DQSQdoEY79SDG -TIjzs0V8I+r3AZI9EstmaO345HVU3kHFFVuBTNP5yHzzeXlqrPaCgOnsAWZsd2VV -tu3y3PgBWSJU1+1XnedtikbmqrQw2VzR0LUSq3CO1Eh5y82YHPVFL5Y6T15I5oyR -IlEf+60ae5V8mYuV4eXaYIImm3/IbYNchlMgPOOI30YYwGFLHqYS8BX/Ga0YoEOk -1R/Q - - - - - - - - - - - - - - diff --git a/package.json b/package.json index 1223684..e288273 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "election-capping", "version": "0.1.0", "main": "server.js", - "proxy": "https://facelect.capping.ecrl.marist.edu:8443", + "proxy": "https://facelect.capping.ecrl.marist.edu", "private": true, "dependencies": { "@node-saml/passport-saml": "^5.0.0", diff --git a/server.js b/server.js index c7e8f14..a9021cf 100644 --- a/server.js +++ b/server.js @@ -96,11 +96,15 @@ app.get('/sso/login', } ); -// Login route +// Redirect base URL to /login +app.get('/', (req, res) => { + res.redirect('/login'); +}); + +// Define the /login route to serve the React app app.get('/login', (req, res) => { - res.send('Login page'); - } -); + res.sendFile(path.join(__dirname, 'build', 'index.html')); +}); // Route to handle admin login app.post('/admin-login', async (req, res) => { From e934d273f7a67371780e0e59709680aeda868d30 Mon Sep 17 00:00:00 2001 From: Brendon Kupsch Date: Sat, 7 Dec 2024 19:24:53 -0500 Subject: [PATCH 147/163] Update server.js --- server.js | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/server.js b/server.js index a9021cf..35d8367 100644 --- a/server.js +++ b/server.js @@ -96,16 +96,6 @@ app.get('/sso/login', } ); -// Redirect base URL to /login -app.get('/', (req, res) => { - res.redirect('/login'); -}); - -// Define the /login route to serve the React app -app.get('/login', (req, res) => { - res.sendFile(path.join(__dirname, 'build', 'index.html')); -}); - // Route to handle admin login app.post('/admin-login', async (req, res) => { const { username, password } = req.body; // Capture username and password from request From 00a3e595604a4a9805b8e8eb618c263032fb7fbb Mon Sep 17 00:00:00 2001 From: Brendon Kupsch Date: Sat, 7 Dec 2024 19:28:21 -0500 Subject: [PATCH 148/163] added get to test / page --- server.js | 6 ++++++ src/Login.tsx | 5 ----- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/server.js b/server.js index 35d8367..6df72fc 100644 --- a/server.js +++ b/server.js @@ -96,6 +96,12 @@ app.get('/sso/login', } ); +app.get('/', (req, res) => { + res.send('well well well'); +} +); + + // Route to handle admin login app.post('/admin-login', async (req, res) => { const { username, password } = req.body; // Capture username and password from request diff --git a/src/Login.tsx b/src/Login.tsx index b43055a..fe0dbec 100644 --- a/src/Login.tsx +++ b/src/Login.tsx @@ -11,11 +11,6 @@ function handleSSOLogin() { function Login() { - - useEffect(() => { - fetch('/login') - }) - return (
Background From 1887590a14fd235517b911485824c8dc5359b594 Mon Sep 17 00:00:00 2001 From: Brendon Kupsch Date: Sat, 7 Dec 2024 19:38:16 -0500 Subject: [PATCH 149/163] ethans changes --- src/App.tsx | 5 +++ src/User-Login.css | 69 ++++++++++++++++++++++++++++++++++++ src/User-Login.tsx | 87 ++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 161 insertions(+) create mode 100644 src/User-Login.css create mode 100644 src/User-Login.tsx diff --git a/src/App.tsx b/src/App.tsx index 3168098..aaa0cfe 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -6,6 +6,7 @@ import AdminView from './AdminView'; // Admin view component import UserProfile from './UserProfile'; // User profile component import { AuthProvider, useAuth } from './AuthContext'; // Adjust the path as necessary import { useNavigate } from 'react-router-dom'; +import Userlogin from './User-Login'; function App() { return ( @@ -26,6 +27,10 @@ function App() { {/* Route for the user profile page */} } /> + + {/* Route for the User Login */} + } /> + diff --git a/src/User-Login.css b/src/User-Login.css new file mode 100644 index 0000000..b3f0446 --- /dev/null +++ b/src/User-Login.css @@ -0,0 +1,69 @@ +/* Login.css */ +.login-box { + position: relative; + background: rgba(255, 255, 255, 0.15); + padding: 15px 120px; + border-radius: 15px; + box-shadow: 0 8px 32px rgba(31, 38, 135, 0.37); + backdrop-filter: blur(4px); + z-index: 2; + text-align: center; + border: 2px solid rgba(255, 255, 255, 0.9); + } + + .input-field { + margin-bottom: 15px; + text-align: left; + } + + .input-field label { + font-size: 16px; + font-weight: bold; + margin-bottom: 5px; + display: block; + } + + .input-field input { + width: 100%; + padding: 10px; + border: 1px solid #ccc; + border-radius: 10px; + font-size: 16px; + box-sizing: border-box; + } + + .input:focus{ + outline: none; + background-color: rgb(244, 244, 244); + } + + + + + .submit-button { + width: 100%; + padding: 10px; + background-color: #b80e0e; + color: white; + font-size: 25px; + font-weight: 600; + border: 2px solid #b80e0e; + border-radius: 15px; + cursor: pointer; + margin-top: 30px; + margin-bottom: 30px; + transition-duration: 0.4s; + } + + .submit-button:hover { + background-color: #921010; + font-size: 25.5px; + border: 2px solid rgb(203, 44, 44); + color: #dddddd; + box-shadow: 0 12px 16px 0 rgba(0,0,0,0.19),0 17px 50px 0 rgba(0,0,0,0.19); + } + + label{ + color: white; + } + diff --git a/src/User-Login.tsx b/src/User-Login.tsx new file mode 100644 index 0000000..5f35f21 --- /dev/null +++ b/src/User-Login.tsx @@ -0,0 +1,87 @@ +import React, { useState, FormEvent } from 'react'; +import { useNavigate } from 'react-router-dom'; +import { useAuth } from './AuthContext'; // Adjust the path as necessary +import './Login.css'; +import './AdminLogin.css'; +import backgroundImage from './assets/background.jpg'; +import logoImage from './assets/logo.png'; +import Footer from './components/footer/footer'; + +const UserLogin: React.FC = () => { + const [username, setUsername] = useState(''); + const [password, setPassword] = useState(''); + const [error, setError] = useState(''); + const navigate = useNavigate(); + const { login } = useAuth(); // Get the login function from context + + const handleSubmit = async (e: FormEvent) => { + e.preventDefault(); + console.log('Submitting login form'); // Log form submission + try { + const response = await fetch('https://facelect.capping.ecrl.marist.edu:3001/admin-login', { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + }, + body: JSON.stringify({ username, password }), + }); + + const data = await response.json(); + + if (response.ok) { + // Call the login function from the Auth context, marking the user as an admin + login(true); // Pass true to indicate admin login + + // Redirect to admin view if login is successful + navigate('/admin-view'); + } else { + setError(data.message); // Show error message if login fails + } + } catch (error) { + console.error('Error logging in:', error); + setError('Something went wrong. Please try again.'); + } + }; + + return ( +
+ Background + Marist Election Profile Logo +
+

User Login:

+ {error &&

{error}

} +
+
+ + setUsername(e.target.value)} + required + /> +
+
+ + setPassword(e.target.value)} + required + /> +
+ +
+
+
+ ); +} + +export default UserLogin; From 6f30530faef1561235d2330e2958c197d5e3116e Mon Sep 17 00:00:00 2001 From: Brendon Kupsch Date: Sat, 7 Dec 2024 19:39:12 -0500 Subject: [PATCH 150/163] added react logic --- server.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/server.js b/server.js index 6df72fc..ab6be72 100644 --- a/server.js +++ b/server.js @@ -1,5 +1,6 @@ require('dotenv').config(); // Load environment variables const express = require('express'); +const path = require('path'); const cors = require('cors'); const crypto = require('crypto'); // Import the crypto module const { client, connectDB } = require('./db/connection'); // Import the client and connectDB @@ -153,6 +154,14 @@ app.get('/faculty', async (req, res) => { } }); +// Serve static files from the React app's build directory +app.use(express.static(path.join(__dirname, 'build'))); + +// Catch-all handler to serve React's index.html +app.get('*', (req, res) => { + res.sendFile(path.join(__dirname, 'build', 'index.html')); +}); + // Read SSL certificate and key const options = { key: fs.readFileSync('./backend/facelect.capping.ecrl.marist.edu.pem'), From 236c2472ba912723082953f4eb1f32c9d6661587 Mon Sep 17 00:00:00 2001 From: Brendon Kupsch Date: Sat, 7 Dec 2024 19:43:19 -0500 Subject: [PATCH 151/163] ethans fix --- src/App.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/App.tsx b/src/App.tsx index aaa0cfe..41444ae 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -6,7 +6,7 @@ import AdminView from './AdminView'; // Admin view component import UserProfile from './UserProfile'; // User profile component import { AuthProvider, useAuth } from './AuthContext'; // Adjust the path as necessary import { useNavigate } from 'react-router-dom'; -import Userlogin from './User-Login'; +import UserLogin from './User-Login'; function App() { return ( From 709f7dd76ee73d85a5be1945caa574de78e239af Mon Sep 17 00:00:00 2001 From: Brendon Kupsch Date: Sat, 7 Dec 2024 19:46:25 -0500 Subject: [PATCH 152/163] removed app.get('/') --- server.js | 6 ------ 1 file changed, 6 deletions(-) diff --git a/server.js b/server.js index ab6be72..f1cfbd2 100644 --- a/server.js +++ b/server.js @@ -97,12 +97,6 @@ app.get('/sso/login', } ); -app.get('/', (req, res) => { - res.send('well well well'); -} -); - - // Route to handle admin login app.post('/admin-login', async (req, res) => { const { username, password } = req.body; // Capture username and password from request From e6b3c54b7229cef958fd6d047413174ce4066f76 Mon Sep 17 00:00:00 2001 From: Brendon Kupsch Date: Sat, 7 Dec 2024 19:48:16 -0500 Subject: [PATCH 153/163] removing ports --- src/User-Login.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/User-Login.tsx b/src/User-Login.tsx index 5f35f21..38877ba 100644 --- a/src/User-Login.tsx +++ b/src/User-Login.tsx @@ -18,7 +18,7 @@ const UserLogin: React.FC = () => { e.preventDefault(); console.log('Submitting login form'); // Log form submission try { - const response = await fetch('https://facelect.capping.ecrl.marist.edu:3001/admin-login', { + const response = await fetch('https://facelect.capping.ecrl.marist.edu/admin-login', { method: 'POST', headers: { 'Content-Type': 'application/json', From 3417a8fa1fcb9a9358a2c741a16d6e61180ed223 Mon Sep 17 00:00:00 2001 From: Brendon Kupsch Date: Sat, 7 Dec 2024 19:50:21 -0500 Subject: [PATCH 154/163] removing unneeded files --- src/App.test.tsx | 9 --------- src/LoginCallback.tsx | 12 ------------ 2 files changed, 21 deletions(-) delete mode 100644 src/App.test.tsx delete mode 100644 src/LoginCallback.tsx diff --git a/src/App.test.tsx b/src/App.test.tsx deleted file mode 100644 index 2a68616..0000000 --- a/src/App.test.tsx +++ /dev/null @@ -1,9 +0,0 @@ -import React from 'react'; -import { render, screen } from '@testing-library/react'; -import App from './App'; - -test('renders learn react link', () => { - render(); - const linkElement = screen.getByText(/learn react/i); - expect(linkElement).toBeInTheDocument(); -}); diff --git a/src/LoginCallback.tsx b/src/LoginCallback.tsx deleted file mode 100644 index 7c58de5..0000000 --- a/src/LoginCallback.tsx +++ /dev/null @@ -1,12 +0,0 @@ -import React from 'react'; - -const Callback: React.FC = () => { - return ( -
- {/* Your page content goes here */} -

Hello, World!

-
- ); -}; - -export default Callback; From 4e468cc4ed900f08de2a1a4df5e24411e9d18342 Mon Sep 17 00:00:00 2001 From: Brendon Kupsch Date: Sat, 7 Dec 2024 19:51:27 -0500 Subject: [PATCH 155/163] removed old create server --- server.js | 5 ----- 1 file changed, 5 deletions(-) diff --git a/server.js b/server.js index f1cfbd2..7537a60 100644 --- a/server.js +++ b/server.js @@ -163,11 +163,6 @@ const options = { ca: fs.readFileSync('./backend/2024_InCommonCA.crt'), }; -// Create HTTPS server on port 3001 -// https.createServer(options, app).listen(3001, () => { -// console.log('HTTPS Server running on port 3001'); -// }); - // create servers const httpServer = http.createServer(app); const httpsServer = https.createServer(options, app); From 4f56deaabfdc6cc159205ca6503bb7b016d26eac Mon Sep 17 00:00:00 2001 From: Brendon Kupsch Date: Sat, 7 Dec 2024 19:53:47 -0500 Subject: [PATCH 156/163] trying different ports --- server.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server.js b/server.js index 7537a60..de126f9 100644 --- a/server.js +++ b/server.js @@ -13,8 +13,8 @@ const session = require('express-session'); const bodyParser = require("body-parser"); const morgan = require('morgan'); -const httpPort = 8080; -const httpsPort = 8443; +const httpPort = 80; +const httpsPort = 443; const app = express(); From eebbe835eee10aa59d77089cfcc194f88accef8d Mon Sep 17 00:00:00 2001 From: Brendon Kupsch Date: Sat, 7 Dec 2024 20:03:06 -0500 Subject: [PATCH 157/163] Delete idp_cert.crt --- backend/idp_cert.crt | 21 --------------------- 1 file changed, 21 deletions(-) delete mode 100644 backend/idp_cert.crt diff --git a/backend/idp_cert.crt b/backend/idp_cert.crt deleted file mode 100644 index b0a4652..0000000 --- a/backend/idp_cert.crt +++ /dev/null @@ -1,21 +0,0 @@ ------BEGIN CERTIFICATE----- -MIIDZDCCAkygAwIBAgIEWUPr+jANBgkqhkiG9w0BAQsFADB0MQswCQYDVQQGEwJV -UzELMAkGA1UECAwCTlkxFTATBgNVBAcMDFBvdWdoa2VlcHNpZTEXMBUGA1UECgwO -TWFyaXN0IENvbGxlZ2UxCzAJBgNVBAsMAklUMRswGQYDVQQDDBJhdXRoLml0Lm1h -cmlzdC5lZHUwHhcNMTcwNjE2MTQzNDIzWhcNMjcwNjE2MTQzNDIzWjB0MQswCQYD -VQQGEwJVUzELMAkGA1UECAwCTlkxFTATBgNVBAcMDFBvdWdoa2VlcHNpZTEXMBUG -A1UECgwOTWFyaXN0IENvbGxlZ2UxCzAJBgNVBAsMAklUMRswGQYDVQQDDBJhdXRo -Lml0Lm1hcmlzdC5lZHUwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDE -43jyxC++dV0lYffBNFiMiSALRzZQIKRGGybuLobzyN7/ItAex9ABY36IKPQ7OPPt -sKofjX4VLcVpehiDAUeQpLOUIOWiEJ3+QBR7WPqGRLW2Hen3utApH1a1+iA5nzqE -uhpu0SMqC1g9Rt5m0ZGAuK+jT4KWfaEe18yphF8szpcVzwfAACr8cbYGSobMbOsz -DgcQnXS+m1qorsn7fLZOa6R4pve/G9YZunFAJXBdmkHGo8Rmd6s/kIgQJZIksqkZ -50gpDqzbIlKRYfHGroztjdGWcXkHUL7UXjUCNbQOvIvml4D8s2JtwgFRwkvo8BJ5 -KCKjJZQi9GZ3SRs4zyabAgMBAAEwDQYJKoZIhvcNAQELBQADggEBAC+wiZCUiTlL -MjNPACIe7f2wz5oit+HYRx3jTVTtWX8t+dWlEMK94LNysPuuU110qy0VeBIPgXXz -Izka8yTOhxbBkQWG/5t7bAygOHhcyd6/XOv8pcwd1K+XMfu/BwLgyqk3pasERPu3 -hClNTmEyAkH1r09+k2TJpXqwA1UU6UGtHSqEwQz+FmNzCvEsyCI9i+cN4sVR9Lme -ifZK7NdEDPu3jCiJgrZ0M6ltHkIf6yYm8xOv/6Ujcfvktofqe7oaqLYwAU1gQ2bC -DkFRqL4im1iI7aKFrOoW9f5NF4Fx4aa9KidDmoSUOUSf42K4qGPZdvGpeRCxz/9q -0HSCaQodCfM= ------END CERTIFICATE----- \ No newline at end of file From cbb6d86fa2b3782013886fb1fa7a7350dbfe943d Mon Sep 17 00:00:00 2001 From: Brendon Kupsch Date: Sat, 7 Dec 2024 20:05:58 -0500 Subject: [PATCH 158/163] testing passport change --- server.js | 1 + 1 file changed, 1 insertion(+) diff --git a/server.js b/server.js index de126f9..740ba40 100644 --- a/server.js +++ b/server.js @@ -58,6 +58,7 @@ passport.use(new SamlStrategy( decryptionPvk: fs.readFileSync('./backend/facelect.capping.ecrl.marist.edu.pem', 'utf-8'), privateCert: fs.readFileSync('./backend/2024_facelect.capping.ecrl.marist.edu.pem', 'utf-8'), idpCert: fs.readFileSync('./backend/idp_cert.pem', 'utf-8'), + signatureAlgorithm: 'sha256', }, (profile, done) => { // Extract user information from the profile From fbf2234d6d70888d5a94a64a4a8b31900613a8fb Mon Sep 17 00:00:00 2001 From: Brendon Kupsch Date: Sat, 7 Dec 2024 20:25:30 -0500 Subject: [PATCH 159/163] Update server.js --- server.js | 1 - 1 file changed, 1 deletion(-) diff --git a/server.js b/server.js index 740ba40..de126f9 100644 --- a/server.js +++ b/server.js @@ -58,7 +58,6 @@ passport.use(new SamlStrategy( decryptionPvk: fs.readFileSync('./backend/facelect.capping.ecrl.marist.edu.pem', 'utf-8'), privateCert: fs.readFileSync('./backend/2024_facelect.capping.ecrl.marist.edu.pem', 'utf-8'), idpCert: fs.readFileSync('./backend/idp_cert.pem', 'utf-8'), - signatureAlgorithm: 'sha256', }, (profile, done) => { // Extract user information from the profile From 630e9515a2b6a092fad2b1bc9de3fff8bd59d6bb Mon Sep 17 00:00:00 2001 From: Brendon Kupsch Date: Sat, 7 Dec 2024 20:35:09 -0500 Subject: [PATCH 160/163] saml strat changes --- server.js | 1 + 1 file changed, 1 insertion(+) diff --git a/server.js b/server.js index de126f9..c402c82 100644 --- a/server.js +++ b/server.js @@ -58,6 +58,7 @@ passport.use(new SamlStrategy( decryptionPvk: fs.readFileSync('./backend/facelect.capping.ecrl.marist.edu.pem', 'utf-8'), privateCert: fs.readFileSync('./backend/2024_facelect.capping.ecrl.marist.edu.pem', 'utf-8'), idpCert: fs.readFileSync('./backend/idp_cert.pem', 'utf-8'), + wantAuthnResponseSigned: false }, (profile, done) => { // Extract user information from the profile From 17390afcaffed69bfa2b2a72e6c91ebe4e26a59d Mon Sep 17 00:00:00 2001 From: Brendon Kupsch Date: Sat, 7 Dec 2024 20:38:20 -0500 Subject: [PATCH 161/163] passport changes --- server.js | 1 + 1 file changed, 1 insertion(+) diff --git a/server.js b/server.js index c402c82..6e6cf00 100644 --- a/server.js +++ b/server.js @@ -58,6 +58,7 @@ passport.use(new SamlStrategy( decryptionPvk: fs.readFileSync('./backend/facelect.capping.ecrl.marist.edu.pem', 'utf-8'), privateCert: fs.readFileSync('./backend/2024_facelect.capping.ecrl.marist.edu.pem', 'utf-8'), idpCert: fs.readFileSync('./backend/idp_cert.pem', 'utf-8'), + wantAssertionsSigned: false, wantAuthnResponseSigned: false }, (profile, done) => { From 877378556f0deb29a7aa5ad600187d0226e7f337 Mon Sep 17 00:00:00 2001 From: Brendon Kupsch Date: Sat, 7 Dec 2024 20:49:26 -0500 Subject: [PATCH 162/163] SAML STRATEGY IS WORKING!!!! --- server.js | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/server.js b/server.js index 6e6cf00..4ff8bd0 100644 --- a/server.js +++ b/server.js @@ -61,13 +61,15 @@ passport.use(new SamlStrategy( wantAssertionsSigned: false, wantAuthnResponseSigned: false }, - (profile, done) => { - // Extract user information from the profile - const user = { - email: profile.emailAddress, - }; - return done(null, user); - } + function (profile, done) { + // for signon + findByEmail(profile.email, function (err, user) { + if (err) { + return done(err); + } + return done(null, user); + }); + }, )); passport.serializeUser((user, done) => { @@ -87,7 +89,7 @@ app.post( failureFlash: true, }), function (req, res) { - res.redirect("/user-profile"); + res.redirect("/user-profile",); } ); From 82fb923a2a47b8cc53e84e616697c51bdac30ccf Mon Sep 17 00:00:00 2001 From: Brendon Kupsch Date: Sat, 7 Dec 2024 20:53:31 -0500 Subject: [PATCH 163/163] Revert "SAML STRATEGY IS WORKING!!!!" This reverts commit 877378556f0deb29a7aa5ad600187d0226e7f337. --- server.js | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/server.js b/server.js index 4ff8bd0..6e6cf00 100644 --- a/server.js +++ b/server.js @@ -61,15 +61,13 @@ passport.use(new SamlStrategy( wantAssertionsSigned: false, wantAuthnResponseSigned: false }, - function (profile, done) { - // for signon - findByEmail(profile.email, function (err, user) { - if (err) { - return done(err); - } - return done(null, user); - }); - }, + (profile, done) => { + // Extract user information from the profile + const user = { + email: profile.emailAddress, + }; + return done(null, user); + } )); passport.serializeUser((user, done) => { @@ -89,7 +87,7 @@ app.post( failureFlash: true, }), function (req, res) { - res.redirect("/user-profile",); + res.redirect("/user-profile"); } );