m-abac-anhnt


Namem-abac-anhnt JSON
Version 1.0.6 PyPI version JSON
download
home_pagehttps://github.com/mobiovn
SummaryThư viện xử lý kiểm tra quyền theo logic ABAC (Attribute-based access control)
upload_time2023-05-08 04:57:53
maintainer
docs_urlNone
authorMOBIO
requires_python>=3
licenseMIT
keywords mobio mobio-engine m-abac
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            ### 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
    merchant_id = "1b99bdcf-d582-4f49-9715-1b61dfff3924"
    resource = "deal"
    # action = "UpdateFromSale"
    action = "ListFromSale"
    account_id = "704eac91-7416-497f-a17d-d81cfa2d3211"
    # thông tin user ko có thì để None 
    user_info = {
        "block": "KHDN",
        "scope_code": "MB##HN"
    }

    pdb = PolicyDecisionPoint(merchant_id=merchant_id, resource=resource, action=action, account_id=account_id,
                              user_info=user_info)
    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
    

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/mobiovn",
    "name": "m-abac-anhnt",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3",
    "maintainer_email": "",
    "keywords": "mobio,mobio-engine,m-abac",
    "author": "MOBIO",
    "author_email": "contact@mobio.vn",
    "download_url": "https://files.pythonhosted.org/packages/69/9a/175ba13dcc24e8d5f3d60b94b2fa5da297fde9618cd77d0dcc8a103c11fe/m-abac-anhnt-1.0.6.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    merchant_id = \"1b99bdcf-d582-4f49-9715-1b61dfff3924\"\n    resource = \"deal\"\n    # action = \"UpdateFromSale\"\n    action = \"ListFromSale\"\n    account_id = \"704eac91-7416-497f-a17d-d81cfa2d3211\"\n    # th\u00f4ng tin user ko c\u00f3 th\u00ec \u0111\u1ec3 None \n    user_info = {\n        \"block\": \"KHDN\",\n        \"scope_code\": \"MB##HN\"\n    }\n\n    pdb = PolicyDecisionPoint(merchant_id=merchant_id, resource=resource, action=action, account_id=account_id,\n                              user_info=user_info)\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    \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.6",
    "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": "23a3ab949667ca56f05a908783a58dc7b5067406f3fc422153cee32e8633196c",
                "md5": "5c2daddca41656974e22a55bed329777",
                "sha256": "f0af64c20496dfe867019a1d80f364bb985fd2bfe01187a9d91f90cd41186172"
            },
            "downloads": -1,
            "filename": "m_abac_anhnt-1.0.6-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "5c2daddca41656974e22a55bed329777",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3",
            "size": 46817,
            "upload_time": "2023-05-08T04:57:51",
            "upload_time_iso_8601": "2023-05-08T04:57:51.420335Z",
            "url": "https://files.pythonhosted.org/packages/23/a3/ab949667ca56f05a908783a58dc7b5067406f3fc422153cee32e8633196c/m_abac_anhnt-1.0.6-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "699a175ba13dcc24e8d5f3d60b94b2fa5da297fde9618cd77d0dcc8a103c11fe",
                "md5": "0d4b54a845604d5966ee3a3c56d4a609",
                "sha256": "99d16e9d451477d659e5b7312a91d251e78436ea0dd6fd2e3f0e79a52d47b323"
            },
            "downloads": -1,
            "filename": "m-abac-anhnt-1.0.6.tar.gz",
            "has_sig": false,
            "md5_digest": "0d4b54a845604d5966ee3a3c56d4a609",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3",
            "size": 21955,
            "upload_time": "2023-05-08T04:57:53",
            "upload_time_iso_8601": "2023-05-08T04:57:53.794834Z",
            "url": "https://files.pythonhosted.org/packages/69/9a/175ba13dcc24e8d5f3d60b94b2fa5da297fde9618cd77d0dcc8a103c11fe/m-abac-anhnt-1.0.6.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-05-08 04:57:53",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "m-abac-anhnt"
}
        
Elapsed time: 0.20153s