Skip to content

UserInfoFetcher (OPA) does not collect all available Entra-Groups for policy checks #858

Description

@AndiS500

Affected Stackable version

Release 26.3

Affected OpenPolicyAgent version

policyagent/opa:1.12.2

Current and expected behavior

The Entra backend of the OPA user-info-fetcher currently requests
/v1.0/users/{id}/memberOf and deserializes only the first response page.
The response model does not handle @odata.nextLink. Users with many Entra
group memberships can therefore receive incomplete group lists.

Possible solution

pub fn group_info(&self, user: &str) -> Url {
let mut user_info_url = self.user_info_endpoint_url.clone();

// Nur Gruppen abrufen, nicht alle directoryObjects.
user_info_url.set_path(&format!(
    "/v1.0/users/{user}/memberOf/microsoft.graph.group"
));

// Weniger Payload, größere Seiten.
// Wichtig: Paging trotzdem weiter auswerten, da $top keine Vollständigkeit garantiert.
user_info_url.set_query(Some("$select=displayName&$top=999"));

user_info_url

}

Please update the Entra backend to follow @odata.nextLink until exhausted.

Optionally restrict the request to:
/v1.0/users/{id}/memberOf/microsoft.graph.group?$select=displayName&$top=999

Additional context

No response

Environment

No response

Would you like to work on fixing this bug?

None

Metadata

Metadata

Assignees

No one assigned

    Labels

    release-noteDenotes a PR that will be considered when it comes time to generate release notes.release/26.7.0type/bug

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions