LWP_AUTHEN_NEGOTIATE_DELEGATE
Define to enable ticket forwarding to webserver.
Gssapi based authentication plugin for lwp
#! /usr/bin/perl -wuse strict;require LWP::UserAgent;# uncomment if you want see what is going wrong messages##use LWP::Debug qw(+);my $ua = LWP::UserAgent->new;my $response = $ua->get('http://testwurst.grolmsnet.lan:8090/geheim/');if ($response->is_success) {print $response->content; # or whatever}else {die $response->status_line;}
just install LWP::Authen::Negotiate, LWP uses it as authentication plugin. Use your LWP::UserAgent Scripts as usual. Authentication is done transparent based on your GSSAPI installation (MIT Kerberos or Heimdal)
WWW-Negotiate Webservers are IIS or Apache with mod_auth_kerb for example.
To see what ist going on add
use LWP::Debug qw(+);
to yor LWP using Scripts.
(e.g. too see what is going wrong with GSSAPI...)
To see what ist going on (and going wrong) add
use LWP::Debug qw(+);
to yor LWP using Scripts.
(e.g. too see what is going wrong with GSSAPI...)
the output will look like this:
LWP::UserAgent::new: ()LWP::UserAgent::request: ()LWP::UserAgent::send_request: GET http://testwurst.grolmsnet.lan:8090/geheim/LWP::UserAgent::_need_proxy: Not proxiedLWP::Protocol::http::request: ()LWP::Protocol::collect: read 478 bytesLWP::UserAgent::request: Simple response: UnauthorizedLWP::Authen::Negotiate::authenticate: authenticate() calledLWP::Authen::Negotiate::authenticate: target hostname testwurst.grolmsnet.lanLWP::Authen::Negotiate::authenticate: GSSAPI servicename HTTP/[email protected]LWP::Authen::Negotiate::authenticate: Miscellaneous failure (see text)LWP::Authen::Negotiate::authenticate: open(/tmp/krb5cc_1000): file not found
In this case the credentials cache was empty. Run kinit first ;-)
LWP_AUTHEN_NEGOTIATE_DELEGATE
Define to enable ticket forwarding to webserver.
Copyright (C) 2006 by Achim Grolms <[email protected]>
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.4 or, at your option, any later version of Perl 5 you may have available.
9 releases since Debian 5.0 (Lenny); the text changed 4 times.