[Issue] There is no logs for OAuth2 plugin events Client Credentials Flow #182

Closed
opened 2021-04-14 11:34:45 +02:00 by rurus9 · 2 comments
rurus9 commented 2021-04-14 11:34:45 +02:00 (Migrated from github.com)

We have "OAuth2 plugin events" logs:

<date_timestamp> - Glewlwyd INFO: Event oauth2 - Plugin '<plugin_name>' - Refresh token generated for client '<client_id>' granted by user '<username>' with scope list '<scope_list>'
<date_timestamp> - Glewlwyd INFO: Event oauth2 - Plugin '<plugin_name>' - Access token generated for client '<client_id>' granted by user '<username>' with scope list '<scope_list>'
<date_timestamp> - Glewlwyd INFO: Event oauth2 - Plugin '<plugin_name>' - Refresh token generated for client '<client_id>' revoked
<date_timestamp> - Glewlwyd INFO: Event oauth2 - Plugin '<plugin_name>' - Access token generated for client '<client_id>' revoked

but there is no logs for Access token generated for Client Credentials flow.

BTW I think adding an origin IP address would be useful, and maybe used flow to? Something like this for Client Credential access token issued:

<date_timestamp> - Glewlwyd INFO: Event oauth2 - Plugin '<plugin_name>' - Flow '<oauth2_flow>' - Access token generated for client '<client_id>' with scope list '<scope_list>' origin '<IP_address>'
We have "OAuth2 plugin events" logs: ``` <date_timestamp> - Glewlwyd INFO: Event oauth2 - Plugin '<plugin_name>' - Refresh token generated for client '<client_id>' granted by user '<username>' with scope list '<scope_list>' <date_timestamp> - Glewlwyd INFO: Event oauth2 - Plugin '<plugin_name>' - Access token generated for client '<client_id>' granted by user '<username>' with scope list '<scope_list>' <date_timestamp> - Glewlwyd INFO: Event oauth2 - Plugin '<plugin_name>' - Refresh token generated for client '<client_id>' revoked <date_timestamp> - Glewlwyd INFO: Event oauth2 - Plugin '<plugin_name>' - Access token generated for client '<client_id>' revoked ``` but there is no logs for Access token generated for Client Credentials flow. BTW I think adding an origin IP address would be useful, and maybe used flow to? Something like this for Client Credential access token issued: ``` <date_timestamp> - Glewlwyd INFO: Event oauth2 - Plugin '<plugin_name>' - Flow '<oauth2_flow>' - Access token generated for client '<client_id>' with scope list '<scope_list>' origin '<IP_address>' ```
babelouest commented 2021-04-14 15:13:48 +02:00 (Migrated from github.com)

My bad, it's forgotten in the documentation but there already is a log event messsage for generation of an access token on client credentials flow: https://github.com/babelouest/glewlwyd/blob/master/src/plugin/protocol_oauth2.c#L443

<date_timestamp> - Glewlwyd INFO: Event oauth2 - Plugin '<plugin_name>' - Access token generated for client '<client_id>' with scope list '<scope_list>'

I'll update the documentation

My bad, it's forgotten in the documentation but there already is a log event messsage for generation of an access token on client credentials flow: https://github.com/babelouest/glewlwyd/blob/master/src/plugin/protocol_oauth2.c#L443 ``` <date_timestamp> - Glewlwyd INFO: Event oauth2 - Plugin '<plugin_name>' - Access token generated for client '<client_id>' with scope list '<scope_list>' ``` I'll update the documentation
babelouest commented 2021-04-14 15:19:32 +02:00 (Migrated from github.com)

Concerning the IP address and the flow to add to the log messages, that can be done as well, I'll append those at the end of the existing message to help current installation parsing configuration.

Concerning the IP address and the flow to add to the log messages, that can be done as well, I'll append those at the end of the existing message to help current installation parsing configuration.
This discussion has been locked. Commenting is limited to contributors.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
KittenSquad/glewlwyd#182
No description provided.