pulibrary / ruby-for-archivesspace

Ruby for ArchivesSpace Training Sessions
1 stars 0 forks source link

[WIP] Support SAML2 authentication #13

Closed jrgriffiniii closed 2 years ago

jrgriffiniii commented 2 years ago

This advances #12 by introducing experimental support for network authentication using thor and selenium-webdriver for interaction using a web browser (there lies also attempts using the mechanize Gem). In order to address higher priority issues, this may need to be delayed before the first workshop session (this feature is not essential for the first workshop).

jrgriffiniii commented 2 years ago

I have finally found the breaking bug for this, apparently there is a broken Backbone.js dependency:

image.png

This is not consistently present, and hence, I was struggling to understand why this was failing.

jrgriffiniii commented 2 years ago

Using https://vpn.princeton.edu/https/pdc-discovery-staging.princeton.edu/ provided me with access over the VPN, while https://pdc-discovery-staging.princeton.edu/ was access-restricted. Hence, one should be able to access the API using https://vpn.princeton.edu/https/aspace-staging.princeton.edu/staff/api/

jrgriffiniii commented 2 years ago

I have briefly confirmed that I am receiving a Palo Alto IP address for requests, so an additional range may need to be added for the ArchivesSpace staging server hosted by Lyrasis.

jrgriffiniii commented 2 years ago

Using binding.irb, one should be able to pass the Selenium Chrome driver cookies for the requests against the ASpace API.

jrgriffiniii commented 2 years ago

This should be deprecated in favor of enquiring about this from Operations or the OIT.