• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Kerberos authentication to a Windows SOAP web service
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Kerberos authentication to a Windows SOAP web service


  • Subject: Kerberos authentication to a Windows SOAP web service
  • From: "Grigutis, John Anthony" <email@hidden>
  • Date: Tue, 31 Jul 2012 20:17:12 +0000
  • Thread-topic: Kerberos authentication to a Windows SOAP web service

Hi all,

Disclaimer: I'm not very familiar with the HTTP protocol or network programming, but I have to interact with a SOAP web service that uses Integrated Windows Authentication (IWA). I've used SudzC for another SOAP service before, so I'm trying to use it here as well, but I'm not getting back any authentication challenge from the web service when it attempts to make a regular NSURLConnection. So I thought I'd try to add the authentication information to the initial request, but I'm running into problems. I'm using OS X 10.8, Xcode 4.4, the latest OS X SDK (10.8), and have the deployment target set to OS X 10.7. Here is an example of the code I'm using to add the authentication information:

#import <Foundation/Foundation.h>

#import <CFNetwork/CFNetwork.h>


int main(int argc, const char * argv[])

{


    @autoreleasepool {

        

        // The URL

        NSURL *url = "">NSURL URLWithString:@"http://someschool.edu/Endpoint.svc"];

        

        // Create the request

        NSMutableURLRequest* request = [NSMutableURLRequest requestWithURL:url];

        

        // Add authentication

        CFHTTPMessageRef dummyRequest =

        CFHTTPMessageCreateRequest(

                                   kCFAllocatorDefault,

                                   CFSTR("GET"),

                                   (CFURLRef)[request URL],

                                   kCFHTTPVersion1_1);

        Boolean result;

        

        result = CFHTTPMessageAddAuthentication(

                                       dummyRequest,

                                       NULL,

                                       NULL,

                                       NULL,

                                       kCFHTTPAuthenticationSchemeKerberos,

                                       FALSE);

        if (result) {

            NSLog(@"success");

        } else {

            NSLog(@"failure");

        }

        

        NSString *authorizationString =

        (NSString *)CFHTTPMessageCopyHeaderFieldValue(

                                                      dummyRequest,

                                                      CFSTR("Authorization"));

        CFRelease(dummyRequest);

        

        [request setValue:authorizationString forHTTPHeaderField:@"Authorization"];



But this fails to build:

Undefined symbols for architecture x86_64:

  "_kCFHTTPAuthenticationSchemeKerberos", referenced from:

      _main in main.o


Is this just a bug? I see kCFHTTPAuthenticationSchemeKerberos is declared in CFHTTPMessage.h.
Additionally, are there any tutorials or documentation regarding Kerberos authentication like this or how to use the Negotiate or Negotiate2 schemes? Is there a way to do this strictly with NSURLRequest and NSConnection objects?

Thanks for the help.

-- 
John Anthony Grigutis
Systems Analyst/Programmer/Mac Specialist
UITS Support Systems, Licensing, & Software Distribution
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Macnetworkprog mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: Kerberos authentication to a Windows SOAP web service
      • From: Jens Alfke <email@hidden>
  • Prev by Date: Re: How to register a client cert for use with a specific SSL server?
  • Next by Date: Re: Kerberos authentication to a Windows SOAP web service
  • Previous by thread: Re: How to register a client cert for use with a specific SSL server?
  • Next by thread: Re: Kerberos authentication to a Windows SOAP web service
  • Index(es):
    • Date
    • Thread