Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document Login Auth #53

Closed
hao-fang opened this issue Jun 11, 2020 · 4 comments
Closed

Document Login Auth #53

hao-fang opened this issue Jun 11, 2020 · 4 comments
Assignees
Labels
documentation Improvements or additions to documentation priority:low

Comments

@hao-fang
Copy link

hao-fang commented Jun 11, 2020

AWS Preparation

  1. Grant necessary permissions to the AWS user. (TODO: check with Nitin)
    image

  2. Click this link to create all necessary resources. This solution comes from this blog post.

    • Application name: acl2020-virtual-conference-website
    • EnableSPAMode: false
    • HttpHeaders: Remove "Content-Security-Policy":"..." from the default value
    • LogLevel: info
    • Version (optional): 1.0
    • AlternateDomainNames (optional): virtual.acl2020.org
  3. Go to "Service" -> "CloudFormation", it should show the created stack serverlessrepo-acl2020-virtual-conference-website. After the creation completes, all created resources are available under the "Outputs" tab.

    • Find the "WebsiteUrl" in the "Outputs" tab. Click it will redirect you to the login page.
      image

AWS Cognito Setup

  1. To customize sign-in UI, go to "App integration" -> "UI customization". Choose the "App client to customize".
    • Upload the acl-logo.png and click "Save Changes". This will make the login page looks like below.
      image

RocketChat OAuth Setup

  1. Create a new OAuth: Administration -> OAuth -> Add custom oauth
Token Path: /oauth2/token
Token Sent Via: Header
ID Token Sent Via: Header
Identity Path: /oauth2/userInfo
Authorize Path: /login
Scope: openid
Param Name for AT: access_token
id: <App client id from Cognito App Clients tab>
Secrete: <App client secrete from Cognito App Clients tab>
  1. Configure AWS Cognito. Add the Callback URL https://<workspace>.rocket.chat/_oauth/<name> (shown in the RocketChat OAuth page) to the AWS Cogito user pool -> App client settings -> Callback URL(s).

  2. Disable the login form: Administration -> Accounts -> Show Default Login Form
    image
    It will make the login interface looks like below,
    image
    When click the button, it will redirect to the login page.
    image

Links

@hao-fang hao-fang added documentation Improvements or additions to documentation priority:low labels Jun 11, 2020
@hao-fang hao-fang self-assigned this Jun 11, 2020
hao-fang pushed a commit that referenced this issue Jun 12, 2020
* Standardized CDNs

* Update tui-code-snippet version

* Update popper cjs -> umd

* cjs -> umd cdn

* Update makefile

* Update makefile to checkout previous branch

* Updated Makefile comment

Co-authored-by: Sasha Rush <sasha.rush@gmail.com>
hao-fang added a commit that referenced this issue Jun 12, 2020
* cal with some magic numbers.

* projection to site_data

* cal v1

* timzones added

* cal finshed.

* cookie solution

* local storage solution

* add python format checks

* add makefile

* add CONTRIBUTING.md

* update

* Update README.md

* Update README.md

* Update README.md

* Fix poster link

* README

* readme

* Format python code

* Prettier on CSS files

* Move to make file

* bugfix cal ?

* speaker CSV format changed.

* fixed lazy-load in schedule

* css fixes

* remove deploy

* Update README.md

* Run prettier and make formatter

* Prettier format code

* added authors

* links added

* minor changes on readme

* drive-by

* Update README.md

* added ci

* added new test

* added newline

* added make test

* edit script

* added pylint

* removed pylint

* used make format

* style check on file

* Create lint_code.yml (#39)

* Create lint_code.yml

* ok

* test

* ok

* pylint

* ok

* ok...

* remove node versin

* Update README.md

* Add files via upload

* Delete miniconf.gif

* Add files via upload

* Update README.md

* Customizable logo size, site_title, and background images (#40)

* Merge mini-conf upstream (#7)

* cal with some magic numbers.

* projection to site_data

* cal v1

* timzones added

* cal finshed.

* cookie solution

* local storage solution

* add python format checks

* add makefile

* add CONTRIBUTING.md

* update

* Update README.md

* Update README.md

* Update README.md

* Fix poster link

* README

* readme

* Format python code

* Prettier on CSS files

* Move to make file

* bugfix cal ?

* speaker CSV format changed.

* fixed lazy-load in schedule

* css fixes

* remove deploy

* Update README.md

* Run prettier and make formatter

* Prettier format code

* added authors

* links added

* minor changes on readme

* drive-by

* Update README.md

Co-authored-by: Strobelt Hendrik <hendrik@strobelt.com>
Co-authored-by: Sasha Rush <sasha.rush@gmail.com>

* adjust base and index

* make height width adjustable

* make height width adjustable

* readmeg

* ok

* use default value

* quote

Co-authored-by: Strobelt Hendrik <hendrik@strobelt.com>
Co-authored-by: Sasha Rush <sasha.rush@gmail.com>

* typo fixed (#43)

Co-authored-by: Sasha Rush <sasha.rush@gmail.com>

* Add Highwire Press meta tags for citation info (#42)

* Add Highwire Press meta tags for citation info

* Fix typos

* Update citation meta tag generation

* Add titles to pages (fixes #23) (#46)

* Validates CSS files during CI (#44)

* ok

* eslint

* backup stylelint

* package

* lint_code.yml

* makefile

* bug

* use npx to execute node packages

* use npm ci

* Delete package-lock.json

* Create package-lock.json

Co-authored-by: Sasha Rush <sasha.rush@gmail.com>

* Add eslint and prettier for JS files (#45)

* wip

* ok

* eslint

* backup stylelint

* package

* lint_code.yml

* makefile

* bug

* use npx to execute node packages

* ok

* use npm ci

* prettier and eslint

* ok

* do not change typehead

* do not change ical

* add prettier ignore

* ok

* ok

* revert

* ok

* ok

* [EASY] Update CONTRIBUTING.md & use safe for config.date (#48)

* Update CONTRIBUTING.md

* use safe for date

* Fix workshop organiser formatting + yaml/json paper data (#47)

* Fix workshop author rendering

* Fix handling of papers when stored as yml or json

* linting

* linting againe

* pull list field handling to method

* Use nice concatenator method

Co-authored-by: Sasha Rush <sasha.rush@gmail.com>

* Cleaned up CDNs (#25) (#49)

* Standardized CDNs

* Update tui-code-snippet version

* Update popper cjs -> umd

* cjs -> umd cdn

Co-authored-by: Sasha Rush <sasha.rush@gmail.com>

* pdf js for poster rendering (#50)

Co-authored-by: Sasha Rush <sasha.rush@gmail.com>

* . (#51)

* Setup make deploy (#31) (#53)

* Standardized CDNs

* Update tui-code-snippet version

* Update popper cjs -> umd

* cjs -> umd cdn

* Update makefile

* Update makefile to checkout previous branch

* Updated Makefile comment

Co-authored-by: Sasha Rush <sasha.rush@gmail.com>

* Integrate chat system (#52)

* Readme

* Chat updates

* update

* Format

* Format

* format chat

* format

* isort nonsense

* Update chat.html

* update poster page

Co-authored-by: Hao Fang <haofang1990@gmail.com>

* added hour start and end for a more compact calendar, if possible (#56)

* support for reading papers in diff formats in make_posters (#57)

* Format chat folder (#58)

* check chat folder as well

* format

* drive-by

* ok

* remove unused imports

* lint

* format

* Integrate SSO for chat and login (#62)

* chat

* auth

* update

* turn off auth by default

* miniconf

* .

Co-authored-by: Sasha <arush@g.harvard.edu>

* don't use const for variable variables (#63)

Co-authored-by: Sasha Rush <sasha.rush@gmail.com>

* Update README.md

* Update README.md

* Update README.md

* Cache Google fonts locally. (#64)

* chat

* auth

* update

* turn off auth by default

* miniconf

* .

* fonts

* cuprum

* prettier

Co-authored-by: Sasha <arush@g.harvard.edu>

* Fix login and uri (#65)

* chat

* auth

* update

* turn off auth by default

* miniconf

* .

* fonts

* cuprum

* prettier

* redirect

* fix redirect

Co-authored-by: Sasha <arush@g.harvard.edu>

* ok

* update Makefile

* makefile

* ok

* ok

Co-authored-by: Strobelt Hendrik <hendrik@strobelt.com>
Co-authored-by: Sasha Rush <sasha.rush@gmail.com>
Co-authored-by: animesh-007 <animeshagarwal7@gmail.com>
Co-authored-by: Sasha Rush <srush.research@gmail.com>
Co-authored-by: Guy Aglionby <GuyAglionby@users.noreply.github.com>
Co-authored-by: Arpan Srivastava <arpansri98@gmail.com>
Co-authored-by: Hendrik Strobelt <HendrikStrobelt@users.noreply.github.com>
Co-authored-by: Sameer Singh <sameeersingh@gmail.com>
Co-authored-by: Sasha <arush@g.harvard.edu>
hao-fang added a commit that referenced this issue Jun 19, 2020
* cal with some magic numbers.

* projection to site_data

* cal v1

* timzones added

* cal finshed.

* cookie solution

* local storage solution

* add python format checks

* add makefile

* add CONTRIBUTING.md

* update

* Update README.md

* Update README.md

* Update README.md

* Fix poster link

* README

* readme

* Format python code

* Prettier on CSS files

* Move to make file

* bugfix cal ?

* speaker CSV format changed.

* fixed lazy-load in schedule

* css fixes

* remove deploy

* Update README.md

* Run prettier and make formatter

* Prettier format code

* added authors

* links added

* minor changes on readme

* drive-by

* Update README.md

* added ci

* added new test

* added newline

* added make test

* edit script

* added pylint

* removed pylint

* used make format

* style check on file

* Create lint_code.yml (#39)

* Create lint_code.yml

* ok

* test

* ok

* pylint

* ok

* ok...

* remove node versin

* Update README.md

* Add files via upload

* Delete miniconf.gif

* Add files via upload

* Update README.md

* Customizable logo size, site_title, and background images (#40)

* Merge mini-conf upstream (#7)

* cal with some magic numbers.

* projection to site_data

* cal v1

* timzones added

* cal finshed.

* cookie solution

* local storage solution

* add python format checks

* add makefile

* add CONTRIBUTING.md

* update

* Update README.md

* Update README.md

* Update README.md

* Fix poster link

* README

* readme

* Format python code

* Prettier on CSS files

* Move to make file

* bugfix cal ?

* speaker CSV format changed.

* fixed lazy-load in schedule

* css fixes

* remove deploy

* Update README.md

* Run prettier and make formatter

* Prettier format code

* added authors

* links added

* minor changes on readme

* drive-by

* Update README.md

Co-authored-by: Strobelt Hendrik <hendrik@strobelt.com>
Co-authored-by: Sasha Rush <sasha.rush@gmail.com>

* adjust base and index

* make height width adjustable

* make height width adjustable

* readmeg

* ok

* use default value

* quote

Co-authored-by: Strobelt Hendrik <hendrik@strobelt.com>
Co-authored-by: Sasha Rush <sasha.rush@gmail.com>

* typo fixed (#43)

Co-authored-by: Sasha Rush <sasha.rush@gmail.com>

* Add Highwire Press meta tags for citation info (#42)

* Add Highwire Press meta tags for citation info

* Fix typos

* Update citation meta tag generation

* Add titles to pages (fixes #23) (#46)

* Validates CSS files during CI (#44)

* ok

* eslint

* backup stylelint

* package

* lint_code.yml

* makefile

* bug

* use npx to execute node packages

* use npm ci

* Delete package-lock.json

* Create package-lock.json

Co-authored-by: Sasha Rush <sasha.rush@gmail.com>

* Add eslint and prettier for JS files (#45)

* wip

* ok

* eslint

* backup stylelint

* package

* lint_code.yml

* makefile

* bug

* use npx to execute node packages

* ok

* use npm ci

* prettier and eslint

* ok

* do not change typehead

* do not change ical

* add prettier ignore

* ok

* ok

* revert

* ok

* ok

* [EASY] Update CONTRIBUTING.md & use safe for config.date (#48)

* Update CONTRIBUTING.md

* use safe for date

* Fix workshop organiser formatting + yaml/json paper data (#47)

* Fix workshop author rendering

* Fix handling of papers when stored as yml or json

* linting

* linting againe

* pull list field handling to method

* Use nice concatenator method

Co-authored-by: Sasha Rush <sasha.rush@gmail.com>

* Cleaned up CDNs (#25) (#49)

* Standardized CDNs

* Update tui-code-snippet version

* Update popper cjs -> umd

* cjs -> umd cdn

Co-authored-by: Sasha Rush <sasha.rush@gmail.com>

* pdf js for poster rendering (#50)

Co-authored-by: Sasha Rush <sasha.rush@gmail.com>

* . (#51)

* Setup make deploy (#31) (#53)

* Standardized CDNs

* Update tui-code-snippet version

* Update popper cjs -> umd

* cjs -> umd cdn

* Update makefile

* Update makefile to checkout previous branch

* Updated Makefile comment

Co-authored-by: Sasha Rush <sasha.rush@gmail.com>

* Integrate chat system (#52)

* Readme

* Chat updates

* update

* Format

* Format

* format chat

* format

* isort nonsense

* Update chat.html

* update poster page

Co-authored-by: Hao Fang <haofang1990@gmail.com>

* added hour start and end for a more compact calendar, if possible (#56)

* support for reading papers in diff formats in make_posters (#57)

* Format chat folder (#58)

* check chat folder as well

* format

* drive-by

* ok

* remove unused imports

* lint

* format

* Integrate SSO for chat and login (#62)

* chat

* auth

* update

* turn off auth by default

* miniconf

* .

Co-authored-by: Sasha <arush@g.harvard.edu>

* don't use const for variable variables (#63)

Co-authored-by: Sasha Rush <sasha.rush@gmail.com>

* Update README.md

* Update README.md

* Update README.md

* Cache Google fonts locally. (#64)

* chat

* auth

* update

* turn off auth by default

* miniconf

* .

* fonts

* cuprum

* prettier

Co-authored-by: Sasha <arush@g.harvard.edu>

* Fix login and uri (#65)

* chat

* auth

* update

* turn off auth by default

* miniconf

* .

* fonts

* cuprum

* prettier

* redirect

* fix redirect

Co-authored-by: Sasha <arush@g.harvard.edu>

* Use different config field for citation date (#66)

To allow HTML in the date field that is used in the index

* bugfix: using correct tippy bundle

* .

* Updated README to show the use of reduce.py (#68)

Mistake with embeddings.py instead of reduce.py

* add lato 900 ttf (#70)

* ok

* ok

Co-authored-by: Strobelt Hendrik <hendrik@strobelt.com>
Co-authored-by: Sasha Rush <sasha.rush@gmail.com>
Co-authored-by: animesh-007 <animeshagarwal7@gmail.com>
Co-authored-by: Sasha Rush <srush.research@gmail.com>
Co-authored-by: Guy Aglionby <GuyAglionby@users.noreply.github.com>
Co-authored-by: Arpan Srivastava <arpansri98@gmail.com>
Co-authored-by: Hendrik Strobelt <HendrikStrobelt@users.noreply.github.com>
Co-authored-by: Sameer Singh <sameeersingh@gmail.com>
Co-authored-by: Sasha <arush@g.harvard.edu>
Co-authored-by: Vukosi <vimarambo@gmail.com>
Co-authored-by: Tom Pollard <tpollard@mit.edu>
@hao-fang
Copy link
Author

close this for now. we can re-open after the conference

@hao-fang
Copy link
Author

hao-fang commented Jun 19, 2020

NOTE: Okay -- this is not trivial. See aws-samples/cloudfront-authorization-at-edge#44.
I'll live with the ugly URL.

AWS Lambda set up for signin.acl2020.org.

serverlessrepo-acl2020-virtual-co-CheckAuthHandler-xxxxx

image

  • Save
  • Action ->Publish New Version
  • Action -> Deploy to Lambda@Edge

serverlessrepo-acl2020-virtual-co-ParseAuthHandler-xxxxx

image

  • Save
  • Action -> Publish New Version
  • Action -> Deploy to Lambda@Edge

serverlessrepo-acl2020-virtual-conf-SignOutHandler-xxxxx

image

  • Save
  • Action -> Publish New Version
  • Action -> Deploy to Lambda@Edge

serverlessrepo-acl2020-virtual-RefreshAuthHandler-xxx

same as above

serverlessrepo-acl2020-virtu-UserPoolDomainHandler

image

Same for index.ts.
Do not need "Deploy to Lambda@Edge"

Verify

  • Go to CloudFront resource, and check if each of this behavior has been updated with the right Lambda function version
    image

@hao-fang
Copy link
Author

hao-fang commented Jun 25, 2020

Remember to use AWS SES and bump the quota for sending welcome emails. Otherwise, it can only send 50 emails per day.

@cyriltw
Copy link

cyriltw commented Apr 12, 2021

Something to add on the Rocket.Chat side of setting up Custom OAuth, it will ask for a URL. This should be URL on AWS Cognito, should look something like https://<app_name>.auth.us-east-1.amazoncognito.com

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation priority:low
Projects
None yet
Development

No branches or pull requests

2 participants