Skip to content

Instantly share code, notes, and snippets.

@tsandall
Created May 12, 2017 15:23
Show Gist options
  • Select an option

  • Save tsandall/4c8c123c9a50d51d0d0137d0e8d24dca to your computer and use it in GitHub Desktop.

Select an option

Save tsandall/4c8c123c9a50d51d0d0137d0e8d24dca to your computer and use it in GitHub Desktop.
package ssh.authz
default allow = false
# Allow access to any user that has the "admin" role.
allow {
data.roles["admin"][_] = input.user
}
# Allow access to any user who contributed to the code running on the host.
allow {
data.hosts[input.host_identity.host_id].contributors[_] = input.user
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment