Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Any simple tutorial to start with ? #56

Open
nesiax opened this issue Dec 29, 2014 · 6 comments
Open

Any simple tutorial to start with ? #56

nesiax opened this issue Dec 29, 2014 · 6 comments

Comments

@nesiax
Copy link
Contributor

nesiax commented Dec 29, 2014

Hello everybody,

I am in the first steps to test pyoidc, I haven't use any single-sign-on method before and I would like to play with it.

Maybe we can begin using the wiki provided within github and publish some howtos.

Let's start with the simple one:

  1. A simple webpage that authenticate a user using a pyoid service.
  2. Let the pyoidc service works with just a fixed array of [(username,password,someinfo)] with passwords in plain text where the system will just validate the user and return the username and someinfo fields to the webpage of point 1. At this point what happen if the user authentication is not successful ? It will stay asking for password or just return to the webpage of point 1 ?
  3. The webpage will print if the user was successfully authenticated and will print it's username and someinfo.

What do you think ?

Next could be:

  1. Changing the fixed array and use an existing source like ldap or a relational database.

Then.

  1. Integrate pyoidc within wsgi in order to use a high grade web server like nginx with uwsgi.

Then.

  1. Remap some fields in order to provide fake information in case of websites that require too much private information.

Does anyone have some literature to read about this topic in a learning by example philosophy ?

Thanks.

@rohe
Copy link
Contributor

rohe commented Dec 29, 2014

29 dec 2014 kl. 15:52 skrev Nestor Diaz notifications@github.com:

Hello everybody,

I am in the first steps to test pyoidc, I haven't use any single-sign-on method before and I would like to play with it.

Maybe we can begin using the wiki provided within github and publish some howtos.

Let's start with the simple one:

• A simple webpage that authenticate a user using a pyoid service.
• Let the pyoidc service works with just a fixed array of [(username,password,someinfo)] with passwords in plain text where the system will just validate the user and return the username and someinfo fields to the webpage of point 1. At this point what happen if the user authentication is not successful ? It will stay asking for password or just return to the webpage of point 1 ?
• The webpage will print if the user was successfully authenticated and will print it's username and someinfo.
What do you think ?

Sounds like a starting point!
If you are prepared to start writing something I’ll give you all the support I can.

Next could be:

• Changing the fixed array and use an existing source like ldap or a relational database.
Then.

• Integrate pyoidc within wsgi in order to use a high grade web server like nginx with uwsgi.
Then.

• Remap some fields in order to provide fake information in case of websites that require too much private information.
Does anyone have some literature to read about this topic in a learning by example philosophy ?

There are some documentation in the pyoidc package that you should read if you haven’t already.

http://pyoidc.readthedocs.org/en/latest/howto/index.html

But that document may only make sense to someone who already knows SSO :-/

— Roland

”Being able to think like a child is an important attribute of being an adult” - Eddie Izzard

@nesiax
Copy link
Contributor Author

nesiax commented Dec 29, 2014

Hi Roland et all, I guess we can start modifying the example from the previous openid implementation which seems to do the job we are planning to do:

https://github.com/openid/python-openid/tree/master/examples

What do you think ?

@rohe
Copy link
Contributor

rohe commented Dec 29, 2014

29 dec 2014 kl. 17:28 skrev Nestor Diaz notifications@github.com:

Hi Roland et all, I guess we can start modifying the example from the previous openid implementation which seems to do the job we are planning to do:

https://github.com/openid/python-openid/tree/master/examples

What do you think ?

I’m not sure the openid example is how single-sign-on normally works so we should
decide on a use case to start with.
Then we could use the server example in oidc_example/op2 and client example in oidc_example/rp3 as a
starting point. Dependent on how close we want to be to the openid example we would have to
sightly modified the existing examples.

— Roland

”Being able to think like a child is an important attribute of being an adult” - Eddie Izzard

@rvedire
Copy link

rvedire commented Apr 8, 2015

Hi Rohe,
Thanks for the amazing work!
I have started dabbling with the tests and the code, I think I can help in putting a clear tutorial after understanding what I'm doing and what code is doing. I write here, the steps I followed meanwhile expecting what should be the next logical step.

  1. I started rp3 test.
  • Server runs at 8666 port on localhost
  • Open the browser and point to localhost:8666
  • Asks me to choose an OP from list (which is empty and drop down doesn;'t work)
    • * Question to you: What I should have been expecting in the drop down list?
  • OR write the UID of any UID provider
    • * I write it as my_uid@gmail.com and click Enter. The browser shows an empty page.
    • * Is it because Webfinger failed during OPen ID connect discovery?
  1. I started op2 test.
    * server runs on 8092 port
    * Question to you: How to connect rp2 and op2 tests?
  2. I started rp2 test.
    * This test should show me the flow of open id connect. But when I enter my UID, browser
    shows an empty page.
    * Question to you: What should have happened here?

Thanks so much!

@rvedire
Copy link

rvedire commented Apr 9, 2015

Hi rohe,
Sorry for bothering you! Could you please answer the above questions? :-)

Thanks a lot!

@rohe
Copy link
Contributor

rohe commented Apr 13, 2015

Finally got some time to look at this, sorry about the delay !

8 apr 2015 kl. 00:56 skrev rvedire notifications@github.com:

I have started dabbling with the tests and the code, I think I can help in putting a clear tutorial after understanding what I'm doing and what code is doing. I write here, the steps I followed meanwhile expecting what should be the next logical step.

• I started rp3 test.

  • Server runs at 8666 port on localhost
  • Open the browser and point to localhost:8666
  • Asks me to choose an OP from list (which is empty and drop down doesn;'t work)
      • * Question to you: What I should have been expecting in the drop down list?

That depends on what you have in the config.py file.
In that file you have a dictionary named CLIENTS. If you have statically registered your RP with an OP this is
where you would put that information. If you want to use Google for instance this is where you would put
the client_id/client_secret they return to you when you register your RP with them.

The drop down list will contain the key values in CLIENTS except for ””.
”” is the place holder for doing dynamic client registration which some OPs support.
At this time I would say that the majority of OP installations don’t support dynamic client registration.

  • OR write the UID of any UID provider
      • * I write it as @gmail.com and click Enter. The browser shows an empty page.

You can’t do dynamic client registration with Google so this will never work.

      • * Is it because Webfinger failed during Open ID connect discovery?

That is one reason.
Google don’t support Webfinger at this time. They do support dynamic provider configuration discovery
and the url for that is https://accounts.google.com .

Another reason is that what you enter should be an account name or an URL.

Note: This is just an example and does not work today and probably not tomorrow either :-)
Hypothetical; In the google case (iff they supported WebFinger) you would have to enter something like foobar@gmail.com or
https://accounts.google.com/foobar .

• I started op2 test.

  • server runs on 8092 port

  • Question to you: How to connect rp2 and op2 tests?

    • I started rp2 test.

OK, rp2 test as it is in the example won’t work. Sorry, have to change that!
If you look in the configuration the BASE is given as a http URL.
It MUST be a https URL. Means you have to supply SERVER_KEY and SERVER_CERT in said file.

Once you have that it should work.

  • This test should show me the flow of open id connect. But when I enter my UID, browser
    shows and empty page.

The UID should be of the form diana@localhost:8092

  • Roland

"It is the consequence of humanity. We are all formed of frailty and error; let us pardon reciprocally each others’ folly - that is the first law of nature.” - Voltaire

@decentral1se decentral1se added this to the P2: SHOULD milestone Feb 21, 2017
mblomdahl added a commit to mkdevops-se/pyoidc that referenced this issue Feb 22, 2019
…`install` target to install all setup.py `extra_requires`, replace README "then just run..." with 1) setting up project pipenv via `make install` and 2) then running through the tests
mblomdahl added a commit to mkdevops-se/pyoidc that referenced this issue Feb 22, 2019
mblomdahl added a commit to mkdevops-se/pyoidc that referenced this issue Feb 22, 2019
mblomdahl added a commit to mkdevops-se/pyoidc that referenced this issue Feb 22, 2019
mblomdahl added a commit to mkdevops-se/pyoidc that referenced this issue Feb 25, 2019
…e -> config_simple.py` to make them importable (and IDE-highlighted) + correct PEP8 style violations :)
mblomdahl added a commit to mkdevops-se/pyoidc that referenced this issue Feb 25, 2019
…tion PyUnusedLocal` annotations + `import os` statement
mblomdahl added a commit to mkdevops-se/pyoidc that referenced this issue Feb 25, 2019
mblomdahl added a commit to mkdevops-se/pyoidc that referenced this issue Feb 25, 2019
…sing `config_simple.py` configuration
mblomdahl added a commit to mkdevops-se/pyoidc that referenced this issue Feb 25, 2019
mblomdahl added a commit to mkdevops-se/pyoidc that referenced this issue Feb 25, 2019
mblomdahl added a commit to mkdevops-se/pyoidc that referenced this issue Feb 25, 2019
mblomdahl added a commit to mkdevops-se/pyoidc that referenced this issue Feb 26, 2019
tpazderka pushed a commit that referenced this issue Feb 26, 2019
#56 & #618
* More instructive long-form command line options for `client_management.py` tool
* Add `client_management.py` CLI as a console script in project `setup.py`
* Bug fix for `oic-client-management --list` command output (and spelling)
* Add changelog entry for `client_management.py` updates
mblomdahl added a commit to mkdevops-se/pyoidc that referenced this issue Feb 27, 2019
mblomdahl added a commit to mkdevops-se/pyoidc that referenced this issue Feb 27, 2019
mblomdahl added a commit to mkdevops-se/pyoidc that referenced this issue Feb 27, 2019
mblomdahl added a commit to mkdevops-se/pyoidc that referenced this issue Mar 1, 2019
…e -> config_simple.py` to make them importable (and IDE-highlighted) + correct PEP8 style violations :)
mblomdahl added a commit to mkdevops-se/pyoidc that referenced this issue Mar 1, 2019
…tion PyUnusedLocal` annotations + `import os` statement
mblomdahl added a commit to mkdevops-se/pyoidc that referenced this issue Mar 1, 2019
mblomdahl pushed a commit to mkdevops-se/pyoidc that referenced this issue Mar 1, 2019
mblomdahl pushed a commit to mkdevops-se/pyoidc that referenced this issue Mar 1, 2019
mblomdahl added a commit to mkdevops-se/pyoidc that referenced this issue Mar 1, 2019
…-line argument documentation for `oidc_example/op2/server.py`
mblomdahl added a commit to mkdevops-se/pyoidc that referenced this issue Mar 1, 2019
andrewkrug pushed a commit to mozilla-iam/pyoidc that referenced this issue Jun 6, 2019
…`install` target to install all setup.py `extra_requires`, replace README "then just run..." with 1) setting up project pipenv via `make install` and 2) then running through the tests
andrewkrug pushed a commit to mozilla-iam/pyoidc that referenced this issue Jun 6, 2019
andrewkrug pushed a commit to mozilla-iam/pyoidc that referenced this issue Jun 6, 2019
andrewkrug pushed a commit to mozilla-iam/pyoidc that referenced this issue Jun 6, 2019
andrewkrug pushed a commit to mozilla-iam/pyoidc that referenced this issue Jun 6, 2019
CZ-NIC#56 & CZ-NIC#618
* More instructive long-form command line options for `client_management.py` tool
* Add `client_management.py` CLI as a console script in project `setup.py`
* Bug fix for `oic-client-management --list` command output (and spelling)
* Add changelog entry for `client_management.py` updates
andrewkrug pushed a commit to mozilla-iam/pyoidc that referenced this issue Jun 6, 2019
…e -> config_simple.py` to make them importable (and IDE-highlighted) + correct PEP8 style violations :)
andrewkrug pushed a commit to mozilla-iam/pyoidc that referenced this issue Jun 6, 2019
…tion PyUnusedLocal` annotations + `import os` statement
andrewkrug pushed a commit to mozilla-iam/pyoidc that referenced this issue Jun 6, 2019
andrewkrug pushed a commit to mozilla-iam/pyoidc that referenced this issue Jun 6, 2019
andrewkrug pushed a commit to mozilla-iam/pyoidc that referenced this issue Jun 6, 2019
andrewkrug pushed a commit to mozilla-iam/pyoidc that referenced this issue Jun 6, 2019
…-line argument documentation for `oidc_example/op2/server.py`
andrewkrug pushed a commit to mozilla-iam/pyoidc that referenced this issue Jun 6, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants