Skip to content

Add some attributes to authz_eb call#2069

Open
mrvanes wants to merge 8 commits into
mainfrom
feature/enhance-authz_eb
Open

Add some attributes to authz_eb call#2069
mrvanes wants to merge 8 commits into
mainfrom
feature/enhance-authz_eb

Conversation

@mrvanes

@mrvanes mrvanes commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

Adds external Subject-id and email to the EB SRAM interrupt call

Adds external Subject-id and email to the EB SRAM interrupt call
@baszoetekouw

Copy link
Copy Markdown
Member

Wouldn't it be more future proof to simply send all attributes over to SBS? That's what we do for the AA and PDP, too.

@baszoetekouw

Copy link
Copy Markdown
Member

Kun je nog een Changelog entry toevoegen?

Comment thread library/EngineBlock/Corto/Filter/Command/SramInterruptFilter.php Outdated
Comment thread library/EngineBlock/Corto/Filter/Command/SramInterruptFilter.php Outdated
@mrvanes
mrvanes requested a review from baszoetekouw July 22, 2026 11:52
- Remove no-op self-assignment ($attributes = $attributes;) left over
  from the attribute extraction refactor
- Use named arguments for the AuthzRequest constructor call to reduce
  the risk of argument-order mistakes as the DTO grows
- Extend test fixtures with subject-id and mail attributes so the new
  externalSubjectId/email extraction logic is actually exercised
  instead of only asserting on empty defaults
@kayjoosten
kayjoosten requested a review from johanib July 22, 2026 12:54
continueUrl: $continueUrl,
serviceId: $serviceId,
issuerId: $issuerId,
attributes: $attributes

@johanib johanib Jul 22, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Passing the whole $attributes object as is seems weird. I think we should at least normalize it. Serializing it as is can lead to inconsistent responses in the case of attributes with Nested XML child elements or with eduPersonTargetedID which uses a NameID object.

So probably good to filter through normalize function:

// snip, removed, see comment below                                                                           

This will potentially drop data from the attribute response, but if that is a problem we should come up with a proper api contract, not just throw in $attributes and hope for the best.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Checked how PDP and AA handle this:
PDP does not filter. AA filters any non-string value. So for consistency, we should mirror AA's approach:
$attributes = $this->filterNonStringValuesFromAttributes($this->getResponseAttributes());

// Filter the non string valued attributes                               
$attributes = self::filterNonStringValuesFromAttributes($attributes);    
                                                                         
private static function filterNonStringValuesFromAttributes($attributes) 
{                                                                        
    return array_filter($attributes, function ($attributeValues) {       
        foreach ($attributeValues as $attributeValue) {                  
            if (!is_string($attributeValue)) {                           
                return false;   // drop the whole attribute              
            }                                                            
        }                                                                
        return true;                                                     
    });                                                                  
}                                                                        

@baszoetekouw baszoetekouw added this to the 7.2.1 milestone Jul 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants