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

Specifying both rsync and scp rules breaks scp functionality #14

Open
ma-ef opened this issue Jun 4, 2023 · 0 comments
Open

Specifying both rsync and scp rules breaks scp functionality #14

ma-ef opened this issue Jun 4, 2023 · 0 comments

Comments

@ma-ef
Copy link

ma-ef commented Jun 4, 2023

My authprogs.yaml looks like this:

-
  from: [10.x.x.x]
  keynames: myhost
  allow:
    - rule_type: rsync
      allow_download: true
      paths: [/tmp/mycert.crt, /tmp/mycert.key]
    - rule_type: scp
      allow_download: true
      paths: [/tmp/mycert.crt, /tmp/mycert.key]

Transferring the file with scp root@myhost:/tmp/mycert.crt /tmp fails with the error
command "scp -f /tmp/mycert.crt" rejected.
The debug log shows:

checking rule """{'from': ['10.x.x.x'], 'keynames': 'myhost', 'allow': [{'rule_type': 'rsync', 'allow_download': True, 'paths': ['/tmp/mycert.crt', '/tmp/mycert.key']}, {'rule_type': 'scp', 'allow_download': True, 'paths': ['/tmp/mycert.crt', '/tmp/mycert.key']}]}"""
client_ip 10.x.x.x in 10.x.x.x/32
keyname "myhost" matches rule.
skipping rsync processing, binary "scp" not in approved list
skipping scp processing, binary "scp" not in approved list

If the rsync section is removed, i.e. config looks like this:

-
  from: [10.x.x.x]
  keynames: myhost
  allow:
    - rule_type: scp
      allow_download: true
      paths: [/tmp/mycert.crt, /tmp/mycert.key]

Everything works as it should and the file can be transferred. Could you please investigate this bug?

@ma-ef ma-ef changed the title Specifying rsync and scp rules breaks Specifying both rsync and scp rules breaks scp functionality Jun 4, 2023
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

1 participant