asyrjasalo / RESTinstance

Robot Framework library for RESTful JSON APIs
https://pypi.org/project/RESTinstance
GNU Lesser General Public License v3.0
206 stars 84 forks source link

Question regarding Kerberos authentication #21

Closed pingjie89 closed 3 years ago

pingjie89 commented 6 years ago

Hi,

My problem is on my request server is using Kerberos authentication.

I tried to do | | Set Headers | { "Authorization" : "Negotiate"} | Was trying to do something similar like what was successfully run using curl curl --negotiate -u : -X GET "url"

Searched around the documentation and didn't find any solution/documentation regarding this item

By using curl --negotiate -u : verbose, I can see:

curl send request and return response is 401, www-authenticate: negotiate curl send request with "Authorization" : "Negotiate {$kerberostoken}" and return response 200, with body result

asyrjasalo commented 6 years ago

Hi,

| Set headers | { "Authorization": "Negotiate ${kerberostoken}" } | does not work?

pingjie89 commented 6 years ago

Unfortunately no, as not very well versed with HTTP security mechanism. Not sure what happened in background.

But I was able to do authenticate through request-kerberos library follow their documentation.

As the change I did in https://github.com/asyrjasalo/RESTinstance/pull/23

Following the example of request-kerberos, I only able to get status code 200 when I use the OPTIONAL flag like kerberos_auth = HTTPKerberosAuth(mutual_authentication=OPTIONAL)

REQUIRED and DISABLED was failed to work.

Atihinen commented 3 years ago

Since this requires external dependency we're not going to implement this right now due to fact that there hasn't been any new requests to support kerberos after 2018. We found that there is Apple supported python library for this purposes https://pypi.org/project/kerberos/. Please re-create issue or pr if there is still the need for this.