Forum Discussion

Janek_42109's avatar
Janek_42109
Icon for Nimbostratus rankNimbostratus
Mar 16, 2016

iRule basic authentification on the node issue

Dear All,

I have an issue with a basic authentification on the node side. I'm using an iRule to manage the authentification like the following :

when HTTP_REQUEST {
set basicdata [b64encode "foo:bar"]
HTTP::header insert Authorization "Basic $basicdata"
}

It's working fine but when the complexity of the password is changed, meaning adding $, *, i got an authentification error. On the ltm log file i have also this :

err tmm3[12591]: 01220001:3: TCL error: /Common/AUTH_App - can't read "AAA": no such variable while executing "b64encode "foo:$AAAbb""*

Did someone already experience the same kind of issue ?

Thanks for your help.

  • Please try this iRule.

    when HTTP_REQUEST {
        set data {foo:$AAAbb""*}
        set basicdata [b64encode $data]
        HTTP::header insert Authorization "Basic $basicdata"
    }
    
  • wonsoo_41223's avatar
    wonsoo_41223
    Historic F5 Account

    Please try this iRule.

    when HTTP_REQUEST {
        set data {foo:$AAAbb""*}
        set basicdata [b64encode $data]
        HTTP::header insert Authorization "Basic $basicdata"
    }