Git Product home page Git Product logo

test-v-pam-oidc's Introduction

test-v-pam-oidc

PoC OIDC(OpenID Connect) PAM authentication module written in vlang.

testing

build testbed image

[host] # git clone https://github.com/yaamai/test-v-pam-oidc
[host] # docker build . -t localhost/test-v-pam-oidc:latest-testbed

prepare OIDC server

[host] # docker run --rm -itd --network host -e HYDRA_ADMIN_URL=http://localhost:4445 oryd/hydra-login-consent-node:v1.3.2
[host] # docker run --rm -itd --network host -e DSN=memory -e URLS_SELF_ISSUER=http://localhost:4444/ -e URLS_CONSENT=http://localhost:3000/consent -e URLS_LOGIN=http://localhost:3000/login  oryd/hydra:v1.10.2-sqlite serve --sqa-opt-out --dangerous-force-http all
[host] # docker run --rm -it --network host -e HYDRA_URL=http://localhost:4445 oryd/hydra:v1.10.2-sqlite clients delete test
[host] # docker run --rm -it --network host -e HYDRA_URL=http://localhost:4445 oryd/hydra:v1.10.2-sqlite clients create --id test --secret some-secret --grant-types authorization_code,refresh_token,client_credentials,implicit --response-types token,code,id_token --scope openid,offline --callbacks http://localhost:3000/ --token-endpoint-auth-method client_secret_post

test login (su)

[host]      # docker run --rm -it --net host -v $PWD:/work -w /work localhost/test-v-pam-oidc:latest-testbed
[container] # su - a
[container] $ su - b
Password: **(press Ctrl+d to skip normal password auth)**
please open and sign-in "http://localhost:4444/oauth2/auth?client_id=test&redirect_uri=http0X0.07FFFE46F904P-10220.0000000.000000localhost0X0.000010000000EP-102244440.000000callback&scope=openid+offline&response_type&state=556af8b571584a8f&nonce=28bb51d84a71b023".
Redirected URL:
ERROR: net.urllib.parse: failed parsing url
su: Authentication failure

re-build or debugging

[container] # v version
V 0.2.4 6425000
[container] # ls
Dockerfile  README.md  memo.txt  old  pam_oidc  pam_oidc.so
[container] # v -cg -prod -shared -o /lib/x86_64-linux-gnu/security/pam_oidc.so pam_oidc/
[container] # ls -al /lib/x86_64-linux-gnu/security/pam_oidc.so
-rwxr-xr-x 1 root root 2631976 Apr  8 07:23 /lib/x86_64-linux-gnu/security/pam_oidc.so

test-v-pam-oidc's People

Contributors

yaamai avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.