### ABAC Engine
Thư viện xử lý kiểm tra quyền theo logic ABAC (Attribute-based access control).
### Cài đặt:
```bash
$ pip3 install m-abac
```
### Sử dụng:
##### Kiểm tra user có quyền thao tác hay không:
```python
from mobio.libs.abac import PolicyDecisionPoint
resource = "deal"
# action = "UpdateFromSale"
action = "ListFromSale"
pdb = PolicyDecisionPoint(resource=resource, action=action)
result = pdb.is_allowed()
if not result.get_allow_access():
# trả về lỗi không có quyền truy cập
```
#### Log - 1.0.0
- release sdk
#### Log - 1.0.2
- update sdk
#### Log - 1.0.3
- update cache
#### Log - 1.0.4
- update cache
#### Log - 1.0.5
- mm-dd operator
- update if exists
#### Log - 1.0.6
- update operator exists
#### Log - 1.0.7
- format date string using parse, string ignore case, accept check value None
#### Log - 1.0.11
- update abac check sub resource Product Holding
Raw data
{
"_id": null,
"home_page": "https://github.com/mobiovn",
"name": "m-abac-test",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3",
"maintainer_email": null,
"keywords": "mobio, mobio-engine, m-abac",
"author": "MOBIO",
"author_email": "contact@mobio.vn",
"download_url": "https://files.pythonhosted.org/packages/2e/f8/c8cc500fa8abae41da8ffdb686f814183a37cb0409df366208d2e7e56b57/m_abac_test-1.0.56.tar.gz",
"platform": null,
"description": "### ABAC Engine\nTh\u01b0 vi\u1ec7n x\u1eed l\u00fd ki\u1ec3m tra quy\u1ec1n theo logic ABAC (Attribute-based access control).\n\n\n### C\u00e0i \u0111\u1eb7t:\n```bash\n $ pip3 install m-abac\n ```\n\n### S\u1eed d\u1ee5ng:\n\n##### Ki\u1ec3m tra user c\u00f3 quy\u1ec1n thao t\u00e1c hay kh\u00f4ng:\n ```python\n from mobio.libs.abac import PolicyDecisionPoint\n resource = \"deal\"\n # action = \"UpdateFromSale\"\n action = \"ListFromSale\"\n\n pdb = PolicyDecisionPoint(resource=resource, action=action)\n result = pdb.is_allowed()\n if not result.get_allow_access():\n # tr\u1ea3 v\u1ec1 l\u1ed7i kh\u00f4ng c\u00f3 quy\u1ec1n truy c\u1eadp \n ```\n#### Log - 1.0.0\n - release sdk\n#### Log - 1.0.2\n - update sdk\n#### Log - 1.0.3\n - update cache\n#### Log - 1.0.4\n - update cache\n#### Log - 1.0.5\n - mm-dd operator\n - update if exists\n#### Log - 1.0.6\n - update operator exists\n#### Log - 1.0.7\n - format date string using parse, string ignore case, accept check value None\n#### Log - 1.0.11\n - update abac check sub resource Product Holding\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "Th\u01b0 vi\u1ec7n x\u1eed l\u00fd ki\u1ec3m tra quy\u1ec1n theo logic ABAC (Attribute-based access control)",
"version": "1.0.56",
"project_urls": {
"Homepage": "https://github.com/mobiovn",
"Source": "https://github.com/mobiovn"
},
"split_keywords": [
"mobio",
" mobio-engine",
" m-abac"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "2ef8c8cc500fa8abae41da8ffdb686f814183a37cb0409df366208d2e7e56b57",
"md5": "1fc3b030b95897d4fa3c95e018146753",
"sha256": "f14e40312376ca63b196846d7848a429df1ecfdfe93b04095ee1c829f476196d"
},
"downloads": -1,
"filename": "m_abac_test-1.0.56.tar.gz",
"has_sig": false,
"md5_digest": "1fc3b030b95897d4fa3c95e018146753",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3",
"size": 33656,
"upload_time": "2024-07-06T10:56:09",
"upload_time_iso_8601": "2024-07-06T10:56:09.017108Z",
"url": "https://files.pythonhosted.org/packages/2e/f8/c8cc500fa8abae41da8ffdb686f814183a37cb0409df366208d2e7e56b57/m_abac_test-1.0.56.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-07-06 10:56:09",
"github": false,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"lcname": "m-abac-test"
}