Forum Discussion
Jeff_Green_4244
Nov 07, 2011Nimbostratus
Create Domino LTPA token on F5 problem
Hi,
I'm trying to use the code at
http://per.lausten.dk/blog/2009/06/how-to-create-a-ltpa-session-cookie-for-lotus-domino-using-f5.html
to create a Domino LTPA token but I am getting the following error showing on the Domino server:
Token does not lead with 0 [Single Sign-On token is invalid].
The token should begin with the version number 0123 e.g. from the code
set ltpa_version "\x00\x01\x02\x03"
However, after decoding the token and then looking at it in a hex editor the version number shows as:
C0 80 01 02 03 .......
Can somebody explain to me why the \x00 is being changed to C0 80 please?
I've experimented putting other numbers in thefirst position to see what happens e.g. \x01\x01\x02\x03 and the hex readout looks correct i.e. 01 01 02 03. It only fails when I use a \x00 in the first position.
Thanks for any suggestions.
Jeff
- Jeff,
Final Base64 encoded token set ltpa_token_final [b64encode $ltpa_token_raw] please add these lines. binary scan $ltpa_token_raw H* ltpa_token_raw_hex log local0. "LTP_TOKEN Hex: $ltpa_token_raw_hex" log local0. "LTP_TOKEN Final: $ltpa_token_final"
- Jeff_Green_4244NimbostratusHi Kurt,
- What we've now found is when the token is subsequently b64encoded, then b64decoded, the leading 00 is replaced with the C0 80. This happens on both v9.4.4 and v10.2.0.
- Hi,
set text "\x00\x01\x02\x03Hello World" set text_enc [b64encode $text] set text_dec [b64decode $text_enc] binary scan $text H* text_hex binary scan $text_enc H* text_enc_hex binary scan $text_dec H* text_dec_hex log local0. "Text: $text_hex" log local0. "Text encoded: $text_enc_hex" log local0. "Text decoded: $text_dec_hex"
- nitassEmployeewhy does it seem okay to me?
[root@ve1023:Active] config b version|grep -iA 1 version BIG-IP Version 10.2.3 112.0 Final Edition [root@ve1023:Active] config b rule myrule list rule myrule { when RULE_INIT { set text "\x00\x01\x02\x03Hello World" set text_enc [b64encode $text] set text_dec [b64decode $text_enc] binary scan $text H* text_hex binary scan $text_enc H* text_enc_hex binary scan $text_dec H* text_dec_hex log local0. "Text: $text_hex" log local0. "Text encoded: $text_enc_hex" log local0. "Text decoded: $text_dec_hex" } } [root@ve1023:Active] config grep -i myrule /var/log/ltm Nov 8 23:54:37 local/ve1023 err mcpd[3752]: 01020066:3: The requested rule (myrule) already exists in partition Common. Nov 8 23:54:37 local/tmm info tmm[4766]: Rule myrule : Text: 0001020348656c6c6f20576f726c64 Nov 8 23:54:37 local/tmm info tmm[4766]: Rule myrule : Text encoded: 414145434130686c6247787649466476636d786b Nov 8 23:54:37 local/tmm info tmm[4766]: Rule myrule : Text decoded: 0001020348656c6c6f20576f726c64
- why does it seem okay to me?
Hi,
[root@lb01:Active] log b rule irule03 list rule irule03 { when RULE_INIT { log local0. "WITHOUT append" set text "\x00\x01\x02\x03Hello World" log local0. "WITH append" set hello "\x00\x01\x02\x03Hello World" set text {} append text $hello set text_enc [b64encode $text] set text_dec [b64decode $text_enc] binary scan $text H* text_hex binary scan $text_enc H* text_enc_hex binary scan $text_dec H* text_dec_hex log local0. "Text: $text_hex" log local0. "Text encoded: $text_enc_hex" log local0. "Text decoded: $text_dec_hex" } }
EDIT: Something is wrong with the string when it is initialized as an empty string with 'set text {}'. Anyway, if I change the init to -- set text '' --, the output looks like this, and it's still wrong (c080 in the string).
Regards
- Hi,
rule irule03a { when RULE_INIT { set hello "Hello World" log local0. "WITH leading \\x00" set prefix "\x00\x01\x02\x03" log local0. "WITHOUT leading \\x00" set prefix "\x01\x02\x03" set text "${prefix}${hello}" log local0. "WITHOUT concatenation" set text "\x00\x01\x02\x03HelloWorld" set text_enc [b64encode $text] set text_dec [b64decode $text_enc] binary scan $text H* text_hex binary scan $text_enc H* text_enc_hex binary scan $text_dec H* text_dec_hex log local0. "Text: $text" log local0. "Text hex: $text_hex" log local0. "Text encoded: $text_enc_hex" log local0. "Text decoded: $text_dec_hex" } }
- Minn_62043CirrostratusFrom http://wiki.tcl.tk/1211
- I guess the function fails to convert it back.
Recent Discussions
Related Content
Â
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects