Beefy Boxes and Bandwidth Generously Provided by pair Networks
Come for the quick hacks, stay for the epiphanies.
 
PerlMonks  

Windows single sign-on / NTLM question

by DamnitAddie (Novice)
on Jan 02, 2019 at 14:35 UTC ( [id://1227921]=perlquestion: print w/replies, xml ) Need Help??

DamnitAddie has asked for the wisdom of the Perl Monks concerning the following question:

Hello Monks, I am retrieving reports from a Microsoft SQL Server Reporting Server (SSRS), using LWP and NTLM. What I'm interested to know is if a module or method within Perl exists to take advantage of the built-in windows single sign-on functionality. When I access the report server URL via Chrome or IE, I am able to access the reports without the need to login with username and/or password.

Does such a thing exist for Perl scripts being run from the same Windows desktop? Unfortunately, I do not have access to the actual SQL server, only the reporting website. This would allow me to copy scripts to co-worker's computers without the need to hard code their passwords.

Replies are listed 'Best First'.
Re: Windows single sign-on / NTLM question
by kschwab (Vicar) on Jan 02, 2019 at 17:24 UTC
    It's been a while, but I believe you want this: LWP::Authen::Negotiate. Or search CPAN for SPNEGO and GSSAPI to find something that might help LWP support Windows SSO.
Re: Windows single sign-on / NTLM question
by talexb (Chancellor) on Jan 02, 2019 at 14:50 UTC

    Wow - off the top of my head, that seems like a really clunky solution.

    If it's at all possible, I'd see about setting up a read-only account to SQL Server, so that you could at least use DBI, perhaps through ODBC (that's how I'm accessing a SQL Server right now).

    Alex / talexb / Toronto

    Thanks PJ. We owe you so much. Groklaw -- RIP -- 2003 to 2013.

      Indeed, that would be ideal. However, exceptionally unlikely.

      The even clunkier solution was to throw the URL at chrome via a system call and then look for the file in the end user's download directory. I have a working proof of concept of this, but woo buddy that's taking serious liberties with the TIMTOWTDI idea.

      I've got a couple other ideas that are slightly less bush league, but I using native windows auth would be ideal.

        The even clunkier solution was to throw the URL at chrome via a system call and then look for the file in the end user's download directory.

        There are some modules to easily drive Firefox/Chrome on CPAN: chrome, chromium ...

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://1227921]
Front-paged by haukex
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others contemplating the Monastery: (3)
As of 2024-04-25 19:20 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found