Greetings all,
I'm trying to implement a ticket-based auth system with SOAP::Lite and apache/mod_perl. The way it works now (with a SOAP::Apache module in the middle dispatching the SOAP request):
client: calls the login method with username and password
SOAP modules: validates username and password; returns username, time() +n, and MD5 string generated from the username, time() + n seconds, and a secret
client: calls a method, passes the username,time,and ticket in the SOAP envelope header.
SOAP modules: validates the ticket and checks expiration, executes if everything's in order
what I'm trying to do, and having a bang-head-on-brick time figuring out, is to have the SOAP::Apache module catch the request, get the remote_host ip, and pass it through to the SOAP method (any way it can get there). The problem is that once the request has been dispatched via SOAP::Transport::HTTP::Apache, it's no longer an Apache request, and (as far as I know) there's no way to get at the Apache Request object from the SOAP module to which the request has been dispatched. So, I'm faced with something like:
- catch the request
- turn it back into a SOAP request
- pull the envelope header element authInfo
- add the remote ip
- reform the request
- re-dispatch the request to the intended modules
although a.) this seems overly complicated, which is usually a sign my implementation has become to complicated, and b.) I'm not at all sure this would work.
Does anyone have any suggestions (along these lines or any alternatives), or lacking that, a definitive "no you can't do that" they can pass along? I get the feeling that there's a section of documentation somewhere that I've overlooked in my scouring that would shed light on this...
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.