Skip to content

Commit d27f2dc

Browse files
authored
Feat/add o auth with cognito (#169)
* chore: Prelim cognito integration with Amplify Authenticator component * feat: Working integration with AWS Cognito, issues with SSL at Server * chore: Update PR build check and deployment with env variables * chore: Update Docusaurus to 3.6.3, fast compilation not enabled * chore: Documentation update and working configuration for local HTTPS for authentication * chore: Provide environment file template, update readme with additional instructions * quickfix: Correct deploy and build configs for github * chore: Update GitHub build and deploy configs to use the Migration API key for adding user to the GitHub org * feat: Some terraform VPC integrations * fix: Disable local env file dependency * fix: Syntax error correction * fix: Correction to docusaurus dependency for dotenv * chore: Removal of deprecated content and audit to markdown content (schedule, readme) * feat: Add UI to Navbar for logged in state, minor markdown updates, remove github icon on navbar (reduce redundancy) * feat: Added unique hello message for authenticated session, prelim work on account settings page * chore: Updated prelim code for account page, changed routing names, added account page to protected route * fix: Comment out dotenv dependency * fix: Correcting the dependency issue again * fix: Trying to correct the dependency issue again * fix: Revert removal of dotenv dependency * fix: Audit gh actions workflow config to utilize explicit environment * fix: Correction to workflow * fix: Typo correction * fix: Attempting alternative approach to build config for workflow * fix: Attempting yet another fix * fix: Trying yet another fix to get env variables on workflow and deployment
1 parent be36bd6 commit d27f2dc

42 files changed

Lines changed: 10129 additions & 3182 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/build.yml

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ on:
77

88
jobs:
99
build:
10+
environment: github-pages
1011
runs-on: ubuntu-latest
11-
1212
steps:
1313
- name: Checkout repository
1414
uses: actions/checkout@v2
@@ -18,11 +18,24 @@ jobs:
1818
with:
1919
node-version: '22'
2020

21-
- name: Install dependencies
21+
- name: Install dependencies
2222
run: npm install
2323

24-
- name: Build Docusaurus site
24+
- name: Build Docusaurus site & configure AWS Cognito Env Variables
2525
run: npm run build
26+
env:
27+
ENV: ${{ vars.ENV }}
28+
REGION: ${{ vars.REGION }}
29+
USER_POOL_ID: ${{ secrets.USER_POOL_ID }}
30+
USER_POOL_WEB_CLIENT_ID: ${{ secrets.USER_POOL_WEB_CLIENT_ID }}
31+
OAUTH_DOMAIN: ${{ secrets.OAUTH_DOMAIN }}
32+
OAUTH_REDIRECT_SIGN_OUT: ${{ vars.OAUTH_REDIRECT_SIGN_OUT }}
33+
OAUTH_REDIRECT_SIGN_RESPONSE_TYPE: ${{ vars.OAUTH_REDIRECT_SIGN_RESPONSE_TYPE }}
34+
AUTHORITY: ${{ secrets.AUTHORITY }}
35+
CLIENT_ID: ${{ secrets.CLIENT_ID }}
36+
REDIRECT_URI: ${{ vars.REDIRECT_URI }}
37+
SCOPE: ${{ vars.SCOPE }}
38+
MIGRATION_API_KEY: ${{ secrets.MIGRATION_API_KEY }}
2639

2740
- name: Post success message
2841
if: success()

.github/workflows/deploy.yml

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ on:
1111
jobs:
1212
build:
1313
runs-on: ubuntu-latest
14+
environment: github-pages
1415
steps:
1516
- name: Checkout repository
1617
uses: actions/checkout@v2
@@ -20,14 +21,28 @@ jobs:
2021
with:
2122
node-version: '22'
2223

23-
- name: Install dependencies
24+
- name: Install dependencies
2425
run: npm install
26+
2527

2628
- name: Fetch Latest Documentation
2729
run: npm run import
2830

29-
- name: Build Docusaurus site
31+
- name: Build Docusaurus site & configure AWS Cognito Env Vars and Secrets
3032
run: npm run build
33+
env:
34+
ENV: ${{ vars.ENV }}
35+
REGION: ${{ vars.REGION }}
36+
USER_POOL_ID: ${{ secrets.USER_POOL_ID }}
37+
USER_POOL_WEB_CLIENT_ID: ${{ secrets.USER_POOL_WEB_CLIENT_ID }}
38+
OAUTH_DOMAIN: ${{ secrets.OAUTH_DOMAIN }}
39+
OAUTH_REDIRECT_SIGN_OUT: ${{ vars.OAUTH_REDIRECT_SIGN_OUT }}
40+
OAUTH_REDIRECT_SIGN_RESPONSE_TYPE: ${{ vars.OAUTH_REDIRECT_SIGN_RESPONSE_TYPE }}
41+
AUTHORITY: ${{ secrets.AUTHORITY }}
42+
CLIENT_ID: ${{ secrets.CLIENT_ID }}
43+
REDIRECT_URI: ${{ vars.REDIRECT_URI }}
44+
SCOPE: ${{ vars.SCOPE }}
45+
MIGRATION_API_KEY: ${{ secrets.MIGRATION_API_KEY }}
3146

3247
- name: Deploy to GitHub Pages
3348
uses: peaceiris/actions-gh-pages@v3

.gitignore

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,14 +24,17 @@ yarn-error.log*
2424
# AWS Secrets
2525
IAM_Automation/aws_creds.py
2626

27-
# HTTPS pem files
27+
# Terraform Stack build files
28+
.terraform
29+
.terraform.lock.hcl
30+
31+
# Localhost HTTPS pem files
2832
*.pem
2933

3034
# Terraform Stack files
3135
*.hcl
3236
.terraform
3337

34-
3538
# Igonre everyhting in docs/activities except md files in the root of docs/activities
3639
docs/activities/*
3740
!docs/activities/*.md

README.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -193,6 +193,28 @@ To add a new activity's instructions onto the activities section of the website,
193193
```
194194
4. Make a Pull Request to merge your branch into **main**. Your activity will be added to the website once the PR is approved and merged.
195195

196+
## 🔬 Login Development
197+
In order to develop with OIDC support locally, HTTPS is required for localhost. This can done easily by creating an SSL certificate for local use.
198+
Here are the steps:
199+
1. Run `mkcert localhost` to generate `localhost.pem` and `localhost-key.pem`
200+
2. Run `mkcert -install` to install the generated certificate in your trust store. After installed, restart your browser.
201+
3. Now you can start the development session as follows:
202+
```zsh
203+
HTTPS=true SSL_CRT_FILE=localhost.pem SSL_KEY_FILE=localhost-key.pem npm start
204+
```
205+
4. Open `https://localhost:3000/` to view your development session rendered to the browser.
206+
207+
>[!CAUTION]
208+
> Never share your generated `.pem`! The `.gitignore` file is preconfigured to ignore `.pem` files within commits. There are severe security complications in exposing your `.pem` files.
209+
210+
>[!NOTE]
211+
> If you don't have access to the `mkcert` command on your system, refer [here](https://github.com/FiloSottile/mkcert) to install `mkcert`.
212+
213+
Similarly, some local environment variables must be specified in order to ensure functionality:
214+
1. Create a copy of the file called `env.template`
215+
2. Within this file populate the provided variables using information available on the AWS Console for Cognito.
216+
3. Once populated with the correct information, authentication should work correctly
217+
196218
## 🎉Acknowledgements
197219
Many thanks to the [UMass Lowell Cloud Computing Club](https://umasslowellclubs.campuslabs.com/engage/organization/cloudcomputingclub) members, our faculty advisor [Dr. Johannes Weis](https://www.uml.edu/sciences/computer-science/people/weis-johannes.aspx), and the [UMass Lowell Computer Science Department](https://www.uml.edu/Sciences/computer-science/) for their support and guidance.
198220

docs/resources/intro-cloud-computing/_category_.json

Lines changed: 0 additions & 7 deletions
This file was deleted.

docs/resources/intro-cloud-computing/account-setup.md

Lines changed: 0 additions & 7 deletions
This file was deleted.

docs/schedule/2024Fall/2024Fall.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,11 @@ ogTitle: Meeting Schedule for Fall 2024
77
ogDescription: Explore the Fall 2024 meeting schedule for the UMass Lowell Cloud Computing Club. Join us for virtual and hybrid sessions every week, featuring expert presentations, hands-on activities, and collaborative projects like UniPath.io. Stay engaged, learn from industry leaders, and contribute to exciting cloud computing initiatives.
88
---
99

10+
:::danger
11+
This schedule is outdated and refers to a past semester. Please check the [latest schedule](../current-schedule) for current information.
12+
:::
13+
14+
1015
<center>
1116

1217
[![Website](https://img.shields.io/badge/Website-UML%20Engage-blue.svg?style=for-the-badge)](https://umasslowellclubs.campuslabs.com/engage/organization/cloudcomputingclub)
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
sidebar_position: 3
3-
title: 🌿 Spring 2023
3+
title: 🌿 Spring 2024
44
slug: /schedule/spring-2023
55
---
66

docs/schedule/2025Spring/2025Spring.mdx

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,11 @@ ogDescription: Explore the Spring 2025 meeting schedule for the UMass Lowell Clo
2020
## 📆 Meeting Schedule
2121

2222
**Events & Meeting Location**:
23-
- https://sesh.fyi/calendar/890983857938116729
2423
- https://umasslowellclubs.campuslabs.com/engage/organization/cloudcomputingclub/events
2524

2625
**Meeting Time**:
2726

28-
- **🏫 Thursdays (In-person/Hybrid)**: 6:30pm-9:30pm
27+
- **🏫 Thursdays (In-person/Hybrid)**: 6:30pm-8:00pm
2928

3029
:::tip
3130
Virtual and hybrid meetings will be hosted on our [Discord server](https://discord.com/invite/WC2NdqYtDt).
@@ -34,8 +33,8 @@ Virtual and hybrid meetings will be hosted on our [Discord server](https://disco
3433
**Meeting Format**:
3534

3635
- **🏫 Thursdays (In-person/Hybrid)**: These meetings follow a more structured format with two key segments:
37-
- **📊 Presentation Section (6:30pm-8:00pm)**: Reserved for presentations, demos, and guest speakers. The content aligns with the weekly topics and provides an opportunity for members to learn from experts in the field.
38-
- **💻 Hands-On Section (8:00pm-9:30pm)**: Focused on practical application of the concepts discussed during the presentation. Members work together on the semester project or other related activities, fostering collaboration and hands-on learning.
36+
- **📊 Presentation Section (6:30pm-7:00pm)**: Reserved for presentations, demos, and guest speakers. The content aligns with the weekly topics and provides an opportunity for members to learn from experts in the field.
37+
- **💻 Hands-On Section (7:00pm-8:00pm)**: Focused on practical application of the concepts discussed during the presentation. Members work together on the semester project or other related activities, fostering collaboration and hands-on learning.
3938

4039
:::info
4140
- 🟢 Meeting with confirmed speakers/topics

docusaurus.config.js

Lines changed: 64 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -81,17 +81,22 @@ const config = {
8181
],
8282
],
8383

84-
// plugins: [
85-
// [
86-
// '@docusaurus/plugin-content-docs',
87-
// {
88-
// id: 'projects',
89-
// path: './projects',
90-
// routeBasePath: './projects',
91-
// sidebarPath: 'projectsSidebars.js',
92-
// },
93-
// ],
94-
// ],
84+
plugins: [
85+
[
86+
"docusaurus-plugin-dotenv",
87+
{
88+
path: "./.env.local",
89+
systemvars: true,
90+
},
91+
// '@docusaurus/plugin-content-docs',
92+
// {
93+
// id: 'projects',
94+
// path: './projects',
95+
// routeBasePath: './projects',
96+
// sidebarPath: 'projectsSidebars.js',
97+
// },
98+
],
99+
],
95100
themes: [
96101
[
97102
require.resolve("@easyops-cn/docusaurus-search-local"),
@@ -127,6 +132,7 @@ const config = {
127132
alt: 'UML Cloud Computing Club Logo',
128133
src: 'img/logo_icon.png',
129134
},
135+
hideOnScroll: true,
130136
items: [
131137

132138
// Schedule
@@ -167,54 +173,51 @@ const config = {
167173
position: 'left',
168174
label: 'Activities',
169175
},
170-
171-
// Github
172-
{
173-
href: 'https://github.com/UMLCloudComputing',
174-
'aria-label': 'GitHub',
175-
className: 'navbar__icon navbar__github',
176-
position: 'right',
177-
html: '<i class="fa fa-github"></i>',
178-
},
176+
// Coder CDE link, will be integrated to the account settings page instead
177+
// {
178+
// href: "https://coder.umlcloudcomputing.org",
179+
// position: "right",
180+
// label: "Coder CDE"
181+
// },
179182

180-
// Socials (Discord, Instagram, LinkedIn)
181-
{
182-
type: 'dropdown',
183-
label: 'Socials',
184-
position: 'right',
185-
items: [
183+
// // Socials (Discord, Instagram, LinkedIn)
184+
// {
185+
// type: 'dropdown',
186+
// label: 'Socials',
187+
// position: 'right',
188+
// items: [
186189

187-
// Discord
188-
{
189-
href: 'https://discord.gg/WC2NdqYtDt',
190-
label: 'Discord',
191-
},
190+
// // Discord
191+
// {
192+
// href: 'https://discord.gg/WC2NdqYtDt',
193+
// label: 'Discord',
194+
// },
192195

193-
// Youtube
194-
{
195-
href: 'https://www.youtube.com/@UMLCloudComputingClub',
196-
label: 'Youtube',
197-
},
196+
// // Youtube
197+
// {
198+
// href: 'https://www.youtube.com/@UMLCloudComputingClub',
199+
// label: 'Youtube',
200+
// },
198201

199-
// Instagram
200-
{
201-
href: 'https://www.instagram.com/umlcloudcomputing/',
202-
label: 'Instagram',
203-
},
202+
// // Instagram
203+
// {
204+
// href: 'https://www.instagram.com/umlcloudcomputing/',
205+
// label: 'Instagram',
206+
// },
204207

205-
// LinkedIn
206-
{
207-
href: 'https://www.linkedin.com/company/umass-lowell-cloud-computing-club/',
208-
label: 'LinkedIn',
209-
},
208+
// // LinkedIn
209+
// {
210+
// href: 'https://www.linkedin.com/company/umass-lowell-cloud-computing-club/',
211+
// label: 'LinkedIn',
212+
// },
210213

211-
// Engage
212-
{
213-
href: 'https://umasslowellclubs.campuslabs.com/engage/organization/cloudcomputingclub',
214-
label: 'Engage',
215-
},
216-
]
217-
},
214+
// // Engage
215+
// {
216+
// href: 'https://umasslowellclubs.campuslabs.com/engage/organization/cloudcomputingclub',
217+
// label: 'Engage',
218+
// },
219+
// ]
220+
// },
218221
],
219222
},
220223
footer: {
@@ -239,6 +242,14 @@ const config = {
239242
label: 'LinkedIn',
240243
href: 'https://www.linkedin.com/company/umass-lowell-cloud-computing-club/',
241244
},
245+
{
246+
href: 'https://www.youtube.com/@UMLCloudComputingClub',
247+
label: 'Youtube',
248+
},
249+
{
250+
href: 'https://www.instagram.com/umlcloudcomputing/',
251+
label: 'Instagram',
252+
},
242253
],
243254
},
244255
{

0 commit comments

Comments
 (0)