hackforla / peopledepot

A project to setup a datastore for people and projects at HackforLA. The link below takes you to the code documentation
https://hackforla.github.io/peopledepot/
GNU General Public License v2.0
7 stars 26 forks source link

Cognito client secrets - API client #174

Open fyliu opened 1 year ago

fyliu commented 1 year ago

Dependency

Overview

As discussed in #147, we need to implement app tokens in addition to user cognito tokens so we can restrict access to approved apps only. i.e. VRMS, website, CTJ.

Action Items

Resources/Instructions

fyliu commented 1 year ago

I'm not sure if the role, stakeholder, feature labels are right.

I feel the "Infrastructure" feature might be wrong on this. Should this be under something like "Authentication"?

ExperimentsInHonesty commented 1 year ago

the labels are correct. Discussed during meeting with Fang and team.

fyliu commented 8 months ago

In OAuth2, there's the concept of app clients that are granted access to authenticate against cognito. The client_secret is one way to determine that a client is who it says it is. It's essentially a password.

But the client_secret is only for use by something that can protect secrets, such as backend servers. For frontends and mobile apps, they would use app clients that don't require a client_secret. They would need to verify their identities some other way.

This issue is interested in securing for frontends where the client_secret doesn't apply.

fyliu commented 4 months ago

Do we still want to have API keys?

API key is a little different than what we initially thought

Cognito already supports this for login

Do we want peopledepot API keys

ExperimentsInHonesty commented 3 months ago

We are going to use Cognito client secrets so that when a user logs into vrms or ctj (client systems), and the client system makes a request to authenticate that user and then show them data, we will know its coming from a client system

fyliu commented 1 month ago

We already have a work issue #242 to integrate with cognito using a client secret. It looks like that issue's dependency #241 is closed and we need to point to the new issue @ethanstrominger made #323, if the PR for it has the same problem of working only with client secret disabled.

Putting this in the ice box until that PR is completed.