Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

about feature-authorizer-matrix-func #4

Open
goldcode88 opened this issue Jul 24, 2018 · 2 comments
Open

about feature-authorizer-matrix-func #4

goldcode88 opened this issue Jul 24, 2018 · 2 comments
Assignees

Comments

@goldcode88
Copy link

I have read https://github.com/EmbeddedEnterprises/autobahnkreuz/blob/master/auth/feature.md.

From I understood, feature-authorizer-matrix-func is an wamp endpoint. From this endpoint, router can receiver a authorize json-string or other format string.
I think this feature is better than crossbar. crossbar put authorizer matrix into config.json. It results in the problem that client authorizer program modified the config.json. It's a risk and inconvenient in production, because config.json has many other important arguments.

Another thing, authorize model in feature.md is simpler than crossbar. The following examples is used in my current project.

{
                            "name": "operator",
                            "permissions": [
                                {
                                    "uri": "",
                                    "match": "prefix",
                                    "allow": {
                                        "call": true,
                                        "register": true,
                                        "publish": true,
                                        "subscribe": true
                                    },
                                    "disclose": {
                                        "caller": true,
                                        "publisher": false
                                    },
                                    "cache": true
                                },
                                {
                                    "uri": "db.delete.user",
                                    "match": "prefix",
                                    "allow": {
                                        "call": false,
                                        "register": false,
                                        "publish": false,
                                        "subscribe": true
                                    },
                                    "disclose": {
                                        "caller": false,
                                        "publisher": false
                                    },
                                    "cache": true
                                },
                                {
                                    "uri": "db.delete.role",
                                    "match": "prefix",
                                    "allow": {
                                        "call": false,
                                        "register": false,
                                        "publish": false,
                                        "subscribe": true
                                    },
                                    "disclose": {
                                        "caller": false,
                                        "publisher": false
                                    },
                                    "cache": true
                                },{
                                    "uri": "db.update.user",
                                    "match": "prefix",
                                    "allow": {
                                        "call": true,
                                        "register": false,
                                        "publish": false,
                                        "subscribe": true
                                    },
                                    "disclose": {
                                        "caller": false,
                                        "publisher": false
                                    },
                                    "cache": true
                                },
                                {
                                    "uri": "db.update.user.login",
                                    "match": "prefix",
                                    "allow": {
                                        "call": true,
                                        "register": false,
                                        "publish": false,
                                        "subscribe": true
                                    },
                                    "disclose": {
                                        "caller": false,
                                        "publisher": false
                                    },
                                    "cache": true
                                }
......

Of course, the current missing features is not core features in authorial.

@johannwagner
Copy link
Member

Okay, what is your real question? Do you need example code?

@goldcode88
Copy link
Author

@johannwagner
I'm waiting for Feature Authorization ready(it's TBD now).
I want to know the current implementation and its todo-list about authorization.
Example code is preferable for me, if it's can be provided now.

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants