help on REST HTTP-headers

Mark Grayson (mgrayson) mgrayson at cisco.com
Thu Jul 23 21:21:01 CEST 2020


 Hi All

 Very new to freeRADIUS and trying to set up a post-auth rest POST to a 3rd party system that is expecting an API-key.

So I set up rest config as 

        post-auth {
            uri = "{$..connect_uri}/post"
            method = 'post'
            body = 'json'
            REST-HTTP-Header = "x-api-key: 94332cabcdef57456582e5af2bfa123456789"
            data = '{"end-user":"radius-test"}'
            tls = ${..tls}
        }

But the debug I see from the POST server is 

    Headers
    -------
    Forwarded: for="<IP@>";proto=https
    X-Cloud-Trace-Context: 0edff73713fcbb7dd9741ac6e8ca6436/18102608228808296760
    X-Forwarded-For: <IP@>, 169.254.1.1
    Content-Length: 26
    Content-Type: application/json
    X-Forwarded-Proto: https
    X-Freeradius-Section: post-auth
    X-Freeradius-Server: default
    Accept: */*
    User-Agent: FreeRADIUS 3.0.22

    Body
    ----
    {"end-user":"radius-test"}


Any idea what I'm doing wrong when trying to configure the x-api-key header?


Cheers,
Mark











More information about the Freeradius-Users mailing list