Sign inSign up

zhiming99/django-oa2cli-cgi

By zhiming99

Updated 7 months ago

demo containers for rpc-frmwrk integration with different OAuth2 implementations.

Image
Networking
Security
Developer tools
0

736

zhiming99/django-oa2cli-cgi repository overview

This repository contains demos for rpc-frmwrk with different authentication support. The 'latest' tag is the demo running django oauth2 client, and the HelloWorld server, the rpcrouter and nginx. And the OAuth2-Server is the demo of a django OAuth2 provider. There is a readme.txt under the /root directory of each image, and you can follow the instruction to start the demo quickly.

本仓库包含1组4个演示容器,用以展示rpc-frmwrk的对OAuth2的支持。

  • 后缀为https-2的两个容器更新了密钥,django-oa2check-https-2使用最新的rpc-frmwrk 0.9.0和ubuntu 24.04.
  • 注意:只有同后缀的一对容器才能配合工作,不同后缀的两个容器不能配合工作。
  • 标有'django-oa2check-https-2'的容器上运行rpc-frmwrk与django整合的服务器.
  • 标有'OAuth2-Server-https-2'的容器上运行的是一个本地的OAuth2认证服务器。
  • 标有springboot-oa2check-https-2的容器是一个rpc-frmwrk和springboot整合的服务器.

使用方法

  • 首先要运行容器OAuth2-Server-https-2,
  • 然后如果要跑django的rpc-frmwrk服务器,就启动标有django-oa2check-https-2的容器。
  • 如果要跑springboot的rpc-frmwrk服务器,就启动标有springboot-oa2check-https-2的容器。
  • 在每个容器的/root目录下各有一个readme.txt,请按照文中的步骤启动各个demo容器。

常见问题

  • 忘记设置ip地址。OAuth2-Server的地址应被设置为172.17.0.3,而另两个rpc-frmwrk的服务器应该为172.17.0.2.
  • 使用https版本时,浏览器提示不安全证书是由于容器使用的是自签名证书,选择信任该证书即可。
  • 务必在运行https版本的django或springboot的容器内的/etc/hosts文件中, 添加上 '172.17.0.3 Server-0'
  • RPC的输出在浏览器的调试器的控制台窗口,firefox和chrome可以按F12,显示该窗口。
  • 示例容器功能比较单一,仅建议用作学习,开发和测试。
  • 启动命令的示例如下: docker run -it --rm --device /dev/fuse --privileged 0x123456 '/bin/bash'。注意必须添加参数--device /dev/fuse

更新

  • 新添加了一个独立的SimpAuth服务器端容器,用于展示使用简单的password的认证方式。它同时支持js/non-js的客户端。该容器不依赖于其他额外服务器容器,自带认证功能。
  • 新添加的SimpAuth容器的/root目录下有一个readme.txt, 请按照文中的说明启动该容器。

Tag summary

Content type

Image

Digest

sha256:f728e6cde

Size

1.4 GB

Last updated

7 months ago

docker pull zhiming99/django-oa2cli-cgi:sprintboot-oa2check-https-2