FOREACH error message?

Stefan Paetow Stefan.Paetow at jisc.ac.uk
Fri Aug 10 16:18:52 CEST 2018


And I've figured it out...

It would help to update the dictionary with the custom values! *headdesk*

*eyeroll*

Stefan Paetow
Consultant, Trust and Identity

t: +44 (0)1235 822 125
gpg: 0x3FCE5142
xmpp: stefanp at jabber.dev.ja.net
skype: stefan.paetow.janet

jisc.ac.uk

Jisc is a registered charity (number 1149740) and a company limited by guarantee which is registered in England under Company No. 5747339, VAT No. GB 197 0632 86. Jisc’s registered office is: One Castlepark, Tower Hill, Bristol, BS2 0JA. T 0203 697 5800.
 

On 10/08/2018, 15:02, "Freeradius-Users on behalf of Stefan Paetow" <freeradius-users-bounces+stefan.paetow=jisc.ac.uk at lists.freeradius.org on behalf of Stefan.Paetow at jisc.ac.uk> wrote:

    Alan, Arran et al, 
    
    I'm getting this message:
    
    /etc/raddb/policy.d/moonshot-assertion[46]: MUST use attribute or list reference in 'foreach'
    /etc/raddb/policy.d/moonshot-assertion[46]: Failed to parse "foreach" subsection.
    /etc/raddb/policy.d/moonshot-assertion[38]: Failed to parse "if" subsection.
    /etc/raddb/policy.d/moonshot-assertion[105]: Failed to parse "saml_add_affiliation" entry.
    
    The policy in question is this (I've marked line 46 with '46>'):
    
    #  This policy adds the eduPersonAffiliation if it exists
    saml_add_affiliation.post-auth {
            #  Only try to add the Affiliation when the attribute exists
            if (&reply:Reply-eduPersonAffiliation) {
                    update control {
                            SAML-Attribute-Value !* ANY
                            SAML-Attribute-Value += "%{explode:&reply:Reply-eduPersonAffiliation ,}"
                    }
                    update reply {
                            SAML-AAA-Assertion += '<saml:Attribute Name="urn:oid:0.9.2342.19200300.100.1.1" NameFormat="urn:oasis:names:tc:SAML:2.0:attrname-format:uri">'
                    }
    46>                foreach &control:SAML-Attribute-Value {
                            update reply {
                                    SAML-AAA-Assertion += '<saml:AttributeValue xsi:type="xs:string">'
                                    SAML-AAA-Assertion += "%{Foreach-Variable-0}"
                                    SAML-AAA-Assertion += '</saml:AttributeValue>'
                            }
                    }
                    update reply {
                            SAML-AAA-Assertion += '</saml:Attribute>'
                    }
            }
    }
    
    I can't see where I'm going wrong here... It's probably something *very* obvious that I can't see. I'm using FreeRADIUS 3.0.15 (I know, I know... It's not the newest).
    
    Can someone point out the obvious mistake? :-/
    
    Thank you :-)
    
    Stefan Paetow
    Consultant, Trust and Identity
    
    t: +44 (0)1235 822 125
    gpg: 0x3FCE5142
    xmpp: stefanp at jabber.dev.ja.net
    skype: stefan.paetow.janet
    
    jisc.ac.uk
    
    Jisc is a registered charity (number 1149740) and a company limited by guarantee which is registered in England under Company No. 5747339, VAT No. GB 197 0632 86. Jisc’s registered office is: One Castlepark, Tower Hill, Bristol, BS2 0JA. T 0203 697 5800.
     
    
    
    -
    List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html




More information about the Freeradius-Users mailing list