-
Notifications
You must be signed in to change notification settings - Fork 46
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
Tutorial permissions not working #79
Comments
Ill take a look at this, the sample_policy.yaml may have not changed while
other comments were addressed in the pull request.
…On Sun, Feb 17, 2019, 11:29 PM Mikael Arguedas ***@***.*** wrote:
Bug report
*Required Info:*
- Operating System:
- Ubuntu Bionic
- Installation type:
- source
- Version or commit hash:
- : sros2 f145bf9
<f145bf9>
- DDS implementation:
- N/A
- Client library (if applicable):
- N/A
Steps to reproduce issue
Follow the SROS2_Linux Tutorial until Access control section
<https://github.com/ros2/sros2/blob/master/SROS2_Linux.md#access-control>
or
$ docker run -it --rm ros:crystal
apt update && apt upgrade -y && apt install -y curl ros-crystal-demo-nodes-cpp ros-crystal-demo-nodes-py ros-crystal-sros2
mkdir ~/sros2_demo && cd ~/sros2_demo
ros2 security create_keystore demo_keys
ros2 security create_key demo_keys talker
ros2 security create_key demo_keys listener
curl -sk https://raw.githubusercontent.com/ros2/sros2/master/examples/sample_policy.yaml -o ./demo_keys/policies.yaml
ros2 security create_permission demo_keys talker demo_keys/policies.yaml
Expected behavior
Generate permission.xml files and be able to use access control
Actual behavior
Fails to create permission files.
Additional information Error1
Traceback (most recent call last):
File "/opt/ros/crystal/bin/ros2", line 11, in <module>
load_entry_point('ros2cli==0.6.3', 'console_scripts', 'ros2')()
File "/opt/ros/crystal/lib/python3.6/site-packages/ros2cli/cli.py", line 69, in main
rc = extension.main(parser=parser, args=args)
File "/opt/ros/crystal/lib/python3.6/site-packages/sros2/command/security.py", line 37, in main
return extension.main(args=args)
File "/opt/ros/crystal/lib/python3.6/site-packages/sros2/verb/create_permission.py", line 44, in main
success = create_permission(args)
File "/opt/ros/crystal/lib/python3.6/site-packages/sros2/api/__init__.py", line 522, in create_permission
permissions_dict = get_permissions(name, policy_file_path)
File "/opt/ros/crystal/lib/python3.6/site-packages/sros2/api/__init__.py", line 500, in get_permissions
return graph['nodes'][name]
KeyError: 'nodes'
Reason: the url
https://raw.githubusercontent.com/ros2/sros2/master/examples/sample_policy.yaml
is broken, the file is now at
https://raw.githubusercontent.com/ros2/sros2/sros2/master/examples/sample_policy.yaml
Error2 (using the updated URL)
ros2 security create_permission demo_keys talker demo_keys/policies.yaml
Namespace(NAME='talker', POLICY_FILE_PATH='demo_keys/policies.yaml', ROOT='demo_keys', _command=<sros2.command.security.SecurityCommand object at 0x7f67d0927860>, _verb=<sros2.verb.create_permission.CreatePermissionVerb object at 0x7f67cbccbdd8>, **{' command': 'security', ' verb': 'create_permission'})
key_dir demo_keys/talker
while scanning a simple key
in "demo_keys/policies.yaml", line 30, column 9
could not find expected ':'
in "demo_keys/policies.yaml", line 31, column 7
The file is invalid yaml format.
The file is missing whitespaces line 30 and 36
Error3(using valid yaml file)
Traceback (most recent call last):
File "/opt/ros/crystal/bin/ros2", line 11, in <module>
load_entry_point('ros2cli==0.6.3', 'console_scripts', 'ros2')()
File "/opt/ros/crystal/lib/python3.6/site-packages/ros2cli/cli.py", line 69, in main
rc = extension.main(parser=parser, args=args)
File "/opt/ros/crystal/lib/python3.6/site-packages/sros2/command/security.py", line 37, in main
return extension.main(args=args)
File "/opt/ros/crystal/lib/python3.6/site-packages/sros2/verb/create_permission.py", line 44, in main
success = create_permission(args)
File "/opt/ros/crystal/lib/python3.6/site-packages/sros2/api/__init__.py", line 524, in create_permission
create_permission_file(permissions_path, name, domain_id, permissions_dict)
File "/opt/ros/crystal/lib/python3.6/site-packages/sros2/api/__init__.py", line 425, in create_permission_file
service_dict = permissions_dict['services']
KeyError: 'services'
@ross-desmond <https://github.com/ross-desmond> @jacobperron
<https://github.com/jacobperron> Is there another policy file to use for the
Linux tutorial <https://github.com/ros2/sros2/blob/master/SROS2_Linux.md>
?
I will try the code and tutorial from #72
<#72> to see if the issue is resolved
with the xml version
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#79>, or mute the thread
<https://github.com/notifications/unsubscribe-auth/AqOeTCGjG3DLl2fSQT840mBvm4GspAmAks5vOlZFgaJpZM4bAP2E>
.
|
Since #72 is a significant change to the policy format, I think it's probably better to merge #81 first, and backport it as a patch for Crystal so the tutorial is not broken. @mjcarroll FYI |
@mikaelarguedas Is this resolved now? |
Yes, #99 was the last blocker 👍 |
Bug report
Required Info:
Steps to reproduce issue
Follow the SROS2_Linux Tutorial until Access control section
or
Expected behavior
Generate permission.xml files and be able to use access control
Actual behavior
Fails to create permission files.
Additional information
Error1
Reason: the url https://raw.githubusercontent.com/ros2/sros2/master/examples/sample_policy.yaml is broken, the file is now at https://raw.githubusercontent.com/ros2/sros2/sros2/master/examples/sample_policy.yaml
Error2 (using the updated URL)
The file is invalid yaml format.
The file is missing whitespaces line 30 and 36
Error3(using valid yaml file)
@ross-desmond @jacobperron Is there another policy file to use for the Linux tutorial ?
I will try the code and tutorial from #72 to see if the issue is resolved with the xml version
Update
I got the tutorial working using #72 + #80
The text was updated successfully, but these errors were encountered: