{"id":19298254,"url":"https://github.com/casbin/okta-role-manager","last_synced_at":"2025-04-22T09:32:20.994Z","repository":{"id":57567634,"uuid":"120993348","full_name":"casbin/okta-role-manager","owner":"casbin","description":"Okta role manager for Casbin","archived":false,"fork":false,"pushed_at":"2023-08-06T14:12:45.000Z","size":21,"stargazers_count":5,"open_issues_count":1,"forks_count":4,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-10T18:47:49.306Z","etag":null,"topics":["access-control","auth","authorization","casbin","okta","okta-api","role-manager"],"latest_commit_sha":null,"homepage":"https://github.com/casbin/casbin","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/casbin.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null},"funding":{"github":"casbin"}},"created_at":"2018-02-10T07:06:11.000Z","updated_at":"2023-02-28T06:28:31.000Z","dependencies_parsed_at":"2023-01-21T23:01:06.209Z","dependency_job_id":"7e78da25-4cdf-4080-8dca-baf7fc6de437","html_url":"https://github.com/casbin/okta-role-manager","commit_stats":{"total_commits":10,"total_committers":3,"mean_commits":"3.3333333333333335","dds":"0.30000000000000004","last_synced_commit":"3176e17ac1bcd150b03f88c8afc5965012a3fd84"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/casbin%2Fokta-role-manager","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/casbin%2Fokta-role-manager/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/casbin%2Fokta-role-manager/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/casbin%2Fokta-role-manager/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/casbin","download_url":"https://codeload.github.com/casbin/okta-role-manager/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248998231,"owners_count":21196008,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["access-control","auth","authorization","casbin","okta","okta-api","role-manager"],"created_at":"2024-11-09T23:07:24.392Z","updated_at":"2025-04-22T09:32:20.974Z","avatar_url":"https://github.com/casbin.png","language":"Go","funding_links":["https://github.com/sponsors/casbin"],"categories":[],"sub_categories":[],"readme":"Okta Role Manager [![Build Status](https://travis-ci.org/casbin/okta-role-manager.svg?branch=master)](https://travis-ci.org/casbin/okta-role-manager) [![Coverage Status](https://coveralls.io/repos/github/casbin/okta-role-manager/badge.svg?branch=master)](https://coveralls.io/github/casbin/okta-role-manager?branch=master) [![Godoc](https://godoc.org/github.com/casbin/okta-role-manager?status.svg)](https://godoc.org/github.com/casbin/okta-role-manager)\n====\n\nOkta Role Manager is the [Okta](https://www.okta.com/) role manager for [Casbin](https://github.com/casbin/casbin). With this library, Casbin can load role hierarchy (user-role mapping) from Okta or save role hierarchy to it (NOT Implemented).\n\n## Installation\n\n    go get github.com/casbin/okta-role-manager\n\n## Simple Example\n\n```go\npackage main\n\nimport (\n\t\"github.com/casbin/casbin\"\n\t\"github.com/casbin/okta-role-manager\"\n)\n\nfunc main() {\n\t// This role manager dose not rely on Casbin policy. So we should not\n\t// specify grouping policy (\"g\" policy rules) in the .csv file.\n\te := casbin.NewEnforcer(\"examples/rbac_model.conf\", \"examples/rbac_policy.csv\")\n\n\t// Use our role manager.\n\t// orgName is your organization name.\n\t// apiToken is the token you created in the Admin portal.\n\t// For example, if your domain name is like: dev-123456.oktapreview.com,\n\t// then your orgName is dev-123456, isProductionOrPreview is false.\n\t// If your domain name is like: company_name.okta.com, then your orgName\n\t// is company_name, isProductionOrPreview is true.\n\trm := oktarolemanager.NewRoleManager(\"dev-000000\", \"your_api_token\", false)\n\te.SetRoleManager(rm)\n\n\t// If our role manager relies on Casbin policy (like reading \"g\"\n\t// policy rules), then we have to set the role manager before loading\n\t// policy.\n\t//\n\t// Otherwise, we can set the role manager at any time, because role\n\t// manager has nothing to do with the adapter.\n\te.LoadPolicy()\n\t\n\t// Check the permission.\n\t// Casbin's subject (user) name uses the Okta user's login field (aka Email address).\n\t// Casbin's role name uses the Okta group's name field (like \"Admin\", \"Everyone\").\n\te.Enforce(\"alice@test.com\", \"data1\", \"read\")\n}\n```\n\n## Getting Help\n\n- [Casbin](https://github.com/casbin/casbin)\n\n## License\n\nThis project is under Apache 2.0 License. See the [LICENSE](LICENSE) file for the full license text.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcasbin%2Fokta-role-manager","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcasbin%2Fokta-role-manager","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcasbin%2Fokta-role-manager/lists"}