Maagan-Michael / invitease

A self contained invitation management system for gatekeeping.
GNU General Public License v3.0
8 stars 1 forks source link

Keycloak seed fix #60

Closed yarons closed 2 years ago

yarons commented 2 years ago

Added service accounts enabled.

inbarbarkai commented 2 years ago

Why did you enable service accounts?

yarons commented 2 years ago

It doesn't work without it, I tried.

yarons commented 2 years ago

OK, what are the options? When you try puting invitease as client id and the uuid as client secret it doesn't work in /docs, there's an error prompt saying thay you didn't enable service account. It's either that or I entered the details in the wrong place out of the several for auth in /docs.

inbarbarkai commented 2 years ago

Are you using authorization code flow?

yarons commented 2 years ago

I'm using the Authorize button at the top, there are numerous option for authorization with different fields, when trying this specific client_id/client_secret option I'm getting an error message which is solved when applying this setting to the client_id.

inbarbarkai commented 2 years ago

OK, you should use the password flow there, that will authenticate you as a user. I'm working on a way to verify the user role. If you'll use the credentials flow, you will be denied by lack of permissions.

yarons commented 2 years ago

So I need to add another user for this purpose to be able to connect with that client credentials? It's only for testing purposes I guess.

inbarbarkai commented 2 years ago

You can use the admin credentials with the invitease client credentials.

yarons commented 2 years ago

I removed "Service Accounts Enabled", switched to the user/password flow, I got another error that was resolved by switching "Direct Access Grants Enabled" on, should I enable this in the seed instead?

inbarbarkai commented 2 years ago

You can seed that

yarons commented 2 years ago

Cool, wasn't sure it's the correct practice, thanks.

inbarbarkai commented 2 years ago

It is not, for ease of test it will suffice.