Skip to main content

Thư viện xử lý kiểm tra quyền theo logic ABAC (Attribute-based access control)

Project description

ABAC Engine

Thư viện xử lý kiểm tra quyền theo logic ABAC (Attribute-based access control).

Cài đặt:

 $ pip3 install m-abac

Sử dụng:

3. Save log action account:
 from m_abac import PolicyDecisionPoint
 merchant_id = "1b99bdcf-d582-4f49-9715-1b61dfff3924"
 resource = "deal"
 # action = "UpdateFromSale"
 action = "ListFromSale"
 account_id = "704eac91-7416-497f-a17d-d81cfa2d3211"
 user_info = {
     "block": "KHDN",
     "scope_code": "MB##HN"
 }
 request_access = {
     "deal": {
         # "block": "KHCN",
         # "scope_code": "MB##HN##CAU_GIAY"
     }
 }

 pdb = PolicyDecisionPoint(merchant_id=merchant_id, resource=resource, action=action, account_id=account_id,
                           user_info=user_info, request_access=request_access)
 result = pdb.is_allowed()
 print("allow access: {}".format(result.get_allow_access()))
 print("display: {}".format(result.get_display_config()))
 print("filter: {}".format(result.get_filter_config()))

Log - 1.0.0

- release sdk

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

m-abc-anhnt-1.0.2.tar.gz (21.4 kB view details)

Uploaded Source

Built Distribution

m_abc_anhnt-1.0.2-py3-none-any.whl (43.1 kB view details)

Uploaded Python 3

File details

Details for the file m-abc-anhnt-1.0.2.tar.gz.

File metadata

  • Download URL: m-abc-anhnt-1.0.2.tar.gz
  • Upload date:
  • Size: 21.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.8.13

File hashes

Hashes for m-abc-anhnt-1.0.2.tar.gz
Algorithm Hash digest
SHA256 3e935b0782dc0f28d25ea3a913d6b12786b784ae3223229d24e21b74128c84c9
MD5 b52455c6b148c127e65ae07f7026c59a
BLAKE2b-256 7fe81e2254718d3fa7193249c224ecb176ea2aedeedb5f594d2e7aa251c80c27

See more details on using hashes here.

File details

Details for the file m_abc_anhnt-1.0.2-py3-none-any.whl.

File metadata

  • Download URL: m_abc_anhnt-1.0.2-py3-none-any.whl
  • Upload date:
  • Size: 43.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.8.13

File hashes

Hashes for m_abc_anhnt-1.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 0d367e9ec64622a89dfc9faf099ad200a56253e315581e7b9821483e606850fb
MD5 a5b6ec6d45a9c772e9aca693ba6a6fce
BLAKE2b-256 93243fee62ac2c44114f91a83185ee4fafc4f1d4de23c9500269fb0a8b37f31f

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page