Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 14 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,21 @@ jobs:
with:
node-version: '22'

- name: Install dependencies
- name: Install dependencies & configure AWS Cognito Env Variables
run: npm install
env:
ENV: ${{ vars.ENV }}
REGION: ${{ vars.REGION }}
USER_POOL_ID: ${{ secrets.USER_POOL_ID }}
USER_POOL_WEB_CLIENT_ID: ${{ secrets.USER_POOL_WEB_CLIENT_ID }}
OAUTH_DOMAIN: ${{ secrets.OAUTH_DOMAIN }}
OAUTH_REDIRECT_SIGN_OUT: ${{ vars.OAUTH_REDIRECT_SIGN_OUT }}
OAUTH_REDIRECT_SIGN_RESPONSE_TYPE: ${{ vars.OAUTH_REDIRECT_SIGN_RESPONSE_TYPE }}
AUTHORITY: ${{ secrets.AUTHORITY }}
CLIENT_ID: ${{ secrets.CLIENT_ID }}
REDIRECT_URI: ${{ vars.REDIRECT_URI }}
SCOPE: ${{ vars.SCOPE }}
MIGRATION_API_KEY: ${{ secrets.MIGRATION_API_KEY }}

- name: Build Docusaurus site
run: npm run build
Expand Down
15 changes: 14 additions & 1 deletion .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,21 @@ jobs:
with:
node-version: '22'

- name: Install dependencies
- name: Install dependencies & configure AWS Cognito Env Vars and Secrets
run: npm install
env:
ENV: ${{ vars.ENV }}
REGION: ${{ vars.REGION }}
USER_POOL_ID: ${{ secrets.USER_POOL_ID }}
USER_POOL_WEB_CLIENT_ID: ${{ secrets.USER_POOL_WEB_CLIENT_ID }}
OAUTH_DOMAIN: ${{ secrets.OAUTH_DOMAIN }}
OAUTH_REDIRECT_SIGN_OUT: ${{ vars.OAUTH_REDIRECT_SIGN_OUT }}
OAUTH_REDIRECT_SIGN_RESPONSE_TYPE: ${{ vars.OAUTH_REDIRECT_SIGN_RESPONSE_TYPE }}
AUTHORITY: ${{ secrets.AUTHORITY }}
CLIENT_ID: ${{ secrets.CLIENT_ID }}
REDIRECT_URI: ${{ vars.REDIRECT_URI }}
SCOPE: ${{ vars.SCOPE }}
MIGRATION_API_KEY: ${{ secrets.MIGRATION_API_KEY }}

- name: Fetch Latest Documentation
run: npm run import
Expand Down
7 changes: 5 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,17 @@ yarn-error.log*
# AWS Secrets
IAM_Automation/aws_creds.py

# HTTPS pem files
# Terraform Stack build files
.terraform
.terraform.lock.hcl

# Localhost HTTPS pem files
*.pem

# Terraform Stack files
*.hcl
.terraform


# Igonre everyhting in docs/activities except md files in the root of docs/activities
docs/activities/*
!docs/activities/*.md
Expand Down
22 changes: 22 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,28 @@ To add a new activity's instructions onto the activities section of the website,
```
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.

## 🔬 Login Development
In order to devleop with OAuth support locally, HTTPS is required for localhost. This can done easily by creating an SSL certificate for local use.
Here are the steps:
1. Run `mkcert localhost` to generate `localhost.pem` and `localhost-key.pem`
2. Run `mkcert -install` to install the generated certificate in your trust store. After installed, restart your browser.
3. Now you can start the development session as follows:
```zsh
HTTPS=true SSL_CRT_FILE=localhost.pem SSL_KEY_FILE=localhost-key.pem npm start
```
4. Open `https://localhost:3000/` to view your development session rendered to the browser.

>[!CAUTION]
> 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.

>[!NOTE]
> If you don't have access to the `mkcert` command on your system, refer [here](https://github.com/FiloSottile/mkcert) to install `mkcert`.

Similarly, some local environment variables must be specified in order to ensure functionality:
1. Create a copy of the file called `env.template`
2. Within this file populate the provided variables using information available on the AWS Console for Cognito.
3. Once populated with the correct information, authentication should work correctly

## 🎉Acknowledgements
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.

Expand Down
17 changes: 11 additions & 6 deletions docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -83,14 +83,19 @@ const config = {

// plugins: [
// [
// '@docusaurus/plugin-content-docs',
// "docusaurus-plugin-dotenv",
// {
// id: 'projects',
// path: './projects',
// routeBasePath: './projects',
// sidebarPath: 'projectsSidebars.js',
// path: "./.env.local",
// systemvars: true,
// },
// ],
// '@docusaurus/plugin-content-docs',
// {
// id: 'projects',
// path: './projects',
// routeBasePath: './projects',
// sidebarPath: 'projectsSidebars.js',
// },
// ],
// ],
themes: [
[
Expand Down
34 changes: 34 additions & 0 deletions env.template
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
## .env.local

## i.e: localhost, dev, prod
ENV="localhost"

## AWS Cognito Region
REGION="us-east-1"

## AWS Cognito User Pool ID
USER_POOL_ID=""

## AWS Cognito User Pool App Client ID
USER_POOL_WEB_CLIENT_ID=""

## AWS Cognito Domain
OAUTH_DOMAIN=""

## Cognito redirect url after a successful sign-out
OAUTH_REDIRECT_SIGN_OUT="https://localhost:3000,https://umlcloudcomputing.org"

## Cognito setup, no need to change it!
OAUTH_REDIRECT_SIGN_RESPONSE_TYPE="code"

## OIDC Authority
AUTHORITY=""

## Client ID
CLIENT_ID=""

## Redirect URI
REDIRECT_URI=""

## Scope
SCOPE="email openid phone"
Loading
Loading