Skip to content

Support verification of the hd parameter for Google #2363

Description

@dingo15

Considering the latest issue with Google described at https://trufflesecurity.com/blog/google-oauth-is-broken-sort-of/, I believe it's reasonable to validate the hd parameter returned by Google.

According to https://developers.google.com/identity/openid-connect/openid-connect,

hd is

The domain associated with the Google Cloud organization of the user. Provided only if the user belongs to a Google Cloud organization.

The Google recommendations are here: https://developers.google.com/identity/openid-connect/openid-connect#validatinganidtoken

Be sure to validate that the returned ID token has an hd claim value that matches what you expect (e.g. mycolledge.edu). Unlike the request parameter, the ID token hd claim is contained within a security token from Google, so the value can be trusted.

At this point, as far as I can see, there are no hd parameter checks in place.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions