dbTalk Databases Forums  

Connecting to OLAP through ADOMD and ImpersonateUser

microsoft.public.sqlserver.olap microsoft.public.sqlserver.olap


Discuss Connecting to OLAP through ADOMD and ImpersonateUser in the microsoft.public.sqlserver.olap forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
scroyston
 
Posts: n/a

Default Connecting to OLAP through ADOMD and ImpersonateUser - 01-05-2005 , 04:13 PM






I have a client machine using ADOMD (Machine A) to connect to an MSAS
Server (Machine B). We are heavily using Cube security. Given that
the username/password is ignored in an MSOLAP connection string, I am
using:
LogonUser(username, null, password, LOGON32_LOGON_NEW_CREDENTIALS,
LOGON32_PROVIDER_WINNT50)
ImpersonateUser(token)
Connection.open(...)
RevertToSelf(...)

With client and server on the same machine things work great.

With two separate machines I get "Database X does not exist".

I assume ImpersonateUser(...) disallows the 'single hop' requirement of NTLM
authentication, and that I need to use a Kerberos setup.


I have followed the kerberos MSAS setup HowTo. I've allowed the machines to
delegate, etc.
My connection string has Integrated Security=SSPI;SSPI=Kerberos included.

Now I get:
"The operation requested failed due to security problems - unknown error"
the first time and
"The operation requested failed due to security problems - the user could
not be authenticated"
subsequent times.

A few questions:
1) Am I correct in assuming I need to use kerberos?
2) Am I using the correct api's
3) Am I using the correct parameters to logonuser
4) Is there a good way to debug this? I can't find anything in either
machine's event logs.

Thanks


Reply With Quote
  #2  
Old   
Jéjé
 
Posts: n/a

Default Re: Connecting to OLAP through ADOMD and ImpersonateUser - 01-05-2005 , 04:31 PM






you have to trust for delegation your machine A.
in the active directory, open the property page of the machine A and trust
the computer for delegation.

Do you use a custom Ntier application (like a custom windows service)? or a
web site?
maybe you have to use the setspn utility to allow a specific account to
delegate the authentication.

For a website, its like this:
(with IIS6 and if the application pool is the network service)
setspn -a HTTP/mywebsitename.com myservername

(with IIS6 and if the application pool is a specific user)
setspn -a HTTP/mywebsitename.com mydomain\myuser

HTTP/mywebsitename.com cannot be associated to 2 different account using
setspn.

If you have a custom windows service I don't know how to authorize it (I
don't know the syntax which replace the HTTP used for a web site)


"scroyston" <scroyston (AT) discussions (DOT) microsoft.com> wrote

Quote:
I have a client machine using ADOMD (Machine A) to connect to an MSAS
Server (Machine B). We are heavily using Cube security. Given that
the username/password is ignored in an MSOLAP connection string, I am
using:
LogonUser(username, null, password, LOGON32_LOGON_NEW_CREDENTIALS,
LOGON32_PROVIDER_WINNT50)
ImpersonateUser(token)
Connection.open(...)
RevertToSelf(...)

With client and server on the same machine things work great.

With two separate machines I get "Database X does not exist".

I assume ImpersonateUser(...) disallows the 'single hop' requirement of
NTLM
authentication, and that I need to use a Kerberos setup.


I have followed the kerberos MSAS setup HowTo. I've allowed the machines
to
delegate, etc.
My connection string has Integrated Security=SSPI;SSPI=Kerberos included.

Now I get:
"The operation requested failed due to security problems - unknown error"
the first time and
"The operation requested failed due to security problems - the user could
not be authenticated"
subsequent times.

A few questions:
1) Am I correct in assuming I need to use kerberos?
2) Am I using the correct api's
3) Am I using the correct parameters to logonuser
4) Is there a good way to debug this? I can't find anything in either
machine's event logs.

Thanks




Reply With Quote
  #3  
Old   
scroyston
 
Posts: n/a

Default Re: Connecting to OLAP through ADOMD and ImpersonateUser - 01-05-2005 , 05:07 PM



Thanks, I have machine A trusted for delegation through active directory per
the HowTo.

It is a custom application that uses ADOMD to connect to MSAS on machine B.
It is not a web application. Do I have to do something with the app to
authorize it for delegation?
The HowTo just says I need to have the user running the app correctly set up.
I also tried running the app through the SYSTEM user (since the howto says
no special work is required), but I got the same problems.

"Jéjé" wrote:

Quote:
you have to trust for delegation your machine A.
in the active directory, open the property page of the machine A and trust
the computer for delegation.

Do you use a custom Ntier application (like a custom windows service)? or a
web site?
maybe you have to use the setspn utility to allow a specific account to
delegate the authentication.

For a website, its like this:
(with IIS6 and if the application pool is the network service)
setspn -a HTTP/mywebsitename.com myservername

(with IIS6 and if the application pool is a specific user)
setspn -a HTTP/mywebsitename.com mydomain\myuser

HTTP/mywebsitename.com cannot be associated to 2 different account using
setspn.

If you have a custom windows service I don't know how to authorize it (I
don't know the syntax which replace the HTTP used for a web site)


"scroyston" <scroyston (AT) discussions (DOT) microsoft.com> wrote in message
news:5F85B5E8-4915-4FAB-889E-172417BF037E (AT) microsoft (DOT) com...
I have a client machine using ADOMD (Machine A) to connect to an MSAS
Server (Machine B). We are heavily using Cube security. Given that
the username/password is ignored in an MSOLAP connection string, I am
using:
LogonUser(username, null, password, LOGON32_LOGON_NEW_CREDENTIALS,
LOGON32_PROVIDER_WINNT50)
ImpersonateUser(token)
Connection.open(...)
RevertToSelf(...)

With client and server on the same machine things work great.

With two separate machines I get "Database X does not exist".

I assume ImpersonateUser(...) disallows the 'single hop' requirement of
NTLM
authentication, and that I need to use a Kerberos setup.


I have followed the kerberos MSAS setup HowTo. I've allowed the machines
to
delegate, etc.
My connection string has Integrated Security=SSPI;SSPI=Kerberos included.

Now I get:
"The operation requested failed due to security problems - unknown error"
the first time and
"The operation requested failed due to security problems - the user could
not be authenticated"
subsequent times.

A few questions:
1) Am I correct in assuming I need to use kerberos?
2) Am I using the correct api's
3) Am I using the correct parameters to logonuser
4) Is there a good way to debug this? I can't find anything in either
machine's event logs.

Thanks





Reply With Quote
  #4  
Old   
Jéjé
 
Posts: n/a

Default Re: Connecting to OLAP through ADOMD and ImpersonateUser - 01-06-2005 , 07:31 AM



can you access another ressource with delegation? (through your code)
like accessing SQL Server using the NT authentication

do you see anything in the event log? (on the 2 computers)
Activate the kerberos log (its a registry entry to change)

"scroyston" <scroyston (AT) discussions (DOT) microsoft.com> wrote

Quote:
Thanks, I have machine A trusted for delegation through active directory
per
the HowTo.

It is a custom application that uses ADOMD to connect to MSAS on machine
B.
It is not a web application. Do I have to do something with the app to
authorize it for delegation?
The HowTo just says I need to have the user running the app correctly set
up.
I also tried running the app through the SYSTEM user (since the howto says
no special work is required), but I got the same problems.

"Jéjé" wrote:

you have to trust for delegation your machine A.
in the active directory, open the property page of the machine A and
trust
the computer for delegation.

Do you use a custom Ntier application (like a custom windows service)? or
a
web site?
maybe you have to use the setspn utility to allow a specific account to
delegate the authentication.

For a website, its like this:
(with IIS6 and if the application pool is the network service)
setspn -a HTTP/mywebsitename.com myservername

(with IIS6 and if the application pool is a specific user)
setspn -a HTTP/mywebsitename.com mydomain\myuser

HTTP/mywebsitename.com cannot be associated to 2 different account using
setspn.

If you have a custom windows service I don't know how to authorize it (I
don't know the syntax which replace the HTTP used for a web site)


"scroyston" <scroyston (AT) discussions (DOT) microsoft.com> wrote in message
news:5F85B5E8-4915-4FAB-889E-172417BF037E (AT) microsoft (DOT) com...
I have a client machine using ADOMD (Machine A) to connect to an MSAS
Server (Machine B). We are heavily using Cube security. Given that
the username/password is ignored in an MSOLAP connection string, I am
using:
LogonUser(username, null, password, LOGON32_LOGON_NEW_CREDENTIALS,
LOGON32_PROVIDER_WINNT50)
ImpersonateUser(token)
Connection.open(...)
RevertToSelf(...)

With client and server on the same machine things work great.

With two separate machines I get "Database X does not exist".

I assume ImpersonateUser(...) disallows the 'single hop' requirement of
NTLM
authentication, and that I need to use a Kerberos setup.


I have followed the kerberos MSAS setup HowTo. I've allowed the
machines
to
delegate, etc.
My connection string has Integrated Security=SSPI;SSPI=Kerberos
included.

Now I get:
"The operation requested failed due to security problems - unknown
error"
the first time and
"The operation requested failed due to security problems - the user
could
not be authenticated"
subsequent times.

A few questions:
1) Am I correct in assuming I need to use kerberos?
2) Am I using the correct api's
3) Am I using the correct parameters to logonuser
4) Is there a good way to debug this? I can't find anything in either
machine's event logs.

Thanks







Reply With Quote
  #5  
Old   
Thomas Kejser
 
Posts: n/a

Default Re: Connecting to OLAP through ADOMD and ImpersonateUser - 01-09-2005 , 09:44 AM



If you enable HTTP access to your Analysis Server you actually get a prompt
for username/password.

Would that work for your application?


--
Yours sincerely
Thomas Kejser

M.Sc, MCDBA


"scroyston" <scroyston (AT) discussions (DOT) microsoft.com> wrote

Quote:
I have a client machine using ADOMD (Machine A) to connect to an MSAS
Server (Machine B). We are heavily using Cube security. Given that
the username/password is ignored in an MSOLAP connection string, I am
using:
LogonUser(username, null, password, LOGON32_LOGON_NEW_CREDENTIALS,
LOGON32_PROVIDER_WINNT50)
ImpersonateUser(token)
Connection.open(...)
RevertToSelf(...)

With client and server on the same machine things work great.

With two separate machines I get "Database X does not exist".

I assume ImpersonateUser(...) disallows the 'single hop' requirement of
NTLM
authentication, and that I need to use a Kerberos setup.


I have followed the kerberos MSAS setup HowTo. I've allowed the machines
to
delegate, etc.
My connection string has Integrated Security=SSPI;SSPI=Kerberos included.

Now I get:
"The operation requested failed due to security problems - unknown error"
the first time and
"The operation requested failed due to security problems - the user could
not be authenticated"
subsequent times.

A few questions:
1) Am I correct in assuming I need to use kerberos?
2) Am I using the correct api's
3) Am I using the correct parameters to logonuser
4) Is there a good way to debug this? I can't find anything in either
machine's event logs.

Thanks




Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.