Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Just Enough OpenID Connect @ MPUG

Just Enough OpenID Connect @ MPUG

Presented to Melbourne Python User Group

Rory Hart

July 02, 2018
Tweet

More Decks by Rory Hart

Other Decks in Technology

Transcript

  1. GRACE HOOPER DATA SCIENTIST Grace has a strong maths &

    stats background and recently joined Rail Corp, working in their fledgling data science department. EXPERIENCE § Matlab § R § Power BI § Excel § Tableau @falican
  2. Hand Cranking the Predictions 1. Export a CSV from data

    warehouse via Power BI. 2. Run the model overnight. 3. Upload CSV via Power BI to data warehouse. 4. Generate the PDF report with Power BI. 5. Email report to stakeholders. @falican THE SCENARIO
  3. The Automation Plan 1. Use Python to download the data

    from the data warehouse. 2. Use Python to upload the predictions to the data warehouse. 3. Run the model on a server. @falican THE SCENARIO
  4. Off to a Slow Start @falican From: Grace Hooper <[email protected]>

    To: Avery Adams <[email protected]> Subject: accessing the warehouse with python Hi Avery, I need to download & upload data to the warehouse using python. Can you help? - Grace From: Avery Adams <[email protected]> To: Grace Hooper <[email protected]> Subject: RE: accessing the warehouse with Python Hi Grace, the warehouse documentation says you can use http & "openid connect" and that I need to give you some client credentials. I've generated you some credentials and included them below along with some other data the docs say you will need. You are the first person to do this so can you let me know how you get on? Here are your client credentials: Client id: gracehooper Client secret: eca4368d5b92c3ae5f46a5404b5bd47f Grant type: password Token url: https://dwh.railcorp.com/oidc/token TALKING OPENID CONNECT
  5. OpenID Connect? OpenID Connect 1.0 is a simple identity layer

    on top of the OAuth 2.0 protocol. It allows clients to verify the identity of the end-user based on the authentication performed by an authorization server, as well as to obtain basic profile information about the end-user in an interoperable and rest-like manner. Authentication? So something like HTTP Basic Auth? @falican TALKING OPENID CONNECT
  6. Grant Type? Client id: gracehooper Client secret: eca4368d5b92c3ae5f46a5404b5bd47f Grant type:

    password Token url: https://dwh.railcorp.com/oidc/token @falican TALKING OPENID CONNECT
  7. Thanks • Auth0 OpenID Connect docs https://auth0.com/docs/protocols/oidc • Requests-OAuthlib: OAuth

    for Humans http://requests-oauthlib.readthedocs.io/en/latest/ @falican