B2Access帐户(de)设置工具

b2accessdeprovisioning的Python项目详细描述


https://img.shields.io/pypi/v/b2accessdeprovisioning.svg

一个python工具,用于处理b2access用户帐户的(de)供应。

b2accessdeprovision工具可用于通过unity的管理api检索永久禁用的b2access用户帐户列表。对于每个禁用的帐户,该工具执行以下操作:

  1. 立即删除分配的属性(不包括用户标识符)
  2. 在给定时间段后计划删除所有帐户信息

最后,该工具将通知发送给一个或多个包含已取消设置帐户列表的收件人。

功能

  • 通过Unity的管理API v1进行B2Access集成
  • 属性白名单,指示删除帐户数据时应保存的信息;否则,该工具将删除分配给永久禁用的B2Access用户帐户的所有属性
  • 可调整的时间长度,在此时间段内,应保留停用用户的记录
  • 通过SMTP发送的电子邮件通知,其中包含JSON格式的取消配置的帐户信息

python版本

完全支持Python2.6或2.7。

安装

要安装该工具,只需运行:

$ pip install b2accessdeprovisioning
?

第三方库和依赖项

安装客户端库时将安装以下库:

配置

工具设置可通过config.yml配置文件进行调整。

示例config.yml

# B2ACCESS API endpoint connection detailsapi:base_url:"https://b2access.eudat.eu:8443"path:"rest-admin"version:"v1"user:"unity_user"password:"unity_password"cert_verify:True# List of attributes that should be saved when removing user information.# Attributes not listed here will be immediately removed upon user# deprovisioning.attr_whitelist:[]# Duration of time for which the records of deprovisioned users should be# maintained (in days). After that period all information about the# deprovisioned users will be permanently removed.retention_period:365# Notification settingsnotifications:email:# SMTP host to connect to. Defaults to the local host if empty.host:"smtp.example.eu"# SMTP port to connect to. Defaults to the standard SMTP port (25) if empty.port:587# Whether to put the SMTP connection in TLS. Defaults to False.use_tls:True# Login username/password if the SMTP server requires authentication;# otherwise empty.user:"smtp_user"password:"smtp_password"# Sender addressfrom:"B2ACCESSNotifications<noreply@b2access.eudat.eu>"# List of recipient addressesto:-"SP1Operator<admin@sp1.eudat.eu>"-"SP2Operator<admin@sp2.eudat.eu>"subject:"DeprovisionedB2ACCESSaccounts"intro_text:"SeeattachmentfordetailsofdeprovisionedB2ACCESSaccounts.\n\nNote:Thisisanautomatedemail,pleasedon'treply."

另请参见config.yml.example

用法

只需运行b2accessdeprovisioning.monitor模块:

$ python -m b2accessdeprovisioning.monitor

注意:该工具将在当前目录中查找config.yml配置文件。

示例通知

有关取消设置的用户帐户的信息通过json格式的电子邮件附件发送(users.json):

[{"id":"3f3d5b40-26ce-45db-808a-a5ca3a4e7515"},{"id":"663a5b04-62ec-9d3b-078b-5ac3a4ae5733"}]

许可证

根据Apache2.0许可证授权,有关详细信息,请参见许可证

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
HTTP标头的java InputStream未终止   java测试SpringWebListener   具有定义的替换编号Java的regex ReplaceAll   在java中使用contains()方法   java在选择查询中使用JoinColumn字段   具有用户的java Start-stop demon不是以给定用户启动   java glBufferData生成GL\u无效\u操作   java中循环代码的循环   Java位无符号移位(>>>>)会产生奇怪的结果   java HQL使用点分隔符从select获取结果   条纹、弹簧、玩耍(或?):使用哪种高性能Java框架?   广播接收机中的java停止服务   java回收器视图占据整个屏幕。不在上面显示我的UI元素   java使MySQL查询更快   java MappedByteBuffer查询   java递归算法问题