mirror of
https://github.com/asterisk/asterisk.git
synced 2026-07-27 16:07:15 -07:00
acl: Add ACL support to http and ari
Add uri prefix based acl support to the built in http server. This allows an acl to be added per uri prefix (ie '/metrics' or '/ws') to restrict access. Add user based acl support for ARI. This adds new acl options to the user section of ari.conf to restrict access on a per user basis. resolves: #1799 UserNote: A new section, type=restriction has been added to http.conf to allow an uri prefix based acl to be configured. See http.conf.sample for examples and more information. The user section of ari.conf can now contain an acl configuration to restrict users access. See ari.conf.sample for examples and more information
This commit is contained in:
committed by
github-actions[bot]
parent
31666e4039
commit
46292c9a45
@@ -130,3 +130,41 @@ bindaddr=127.0.0.1
|
||||
; POST URL: /asterisk/uploads will put files in /var/lib/asterisk/uploads/.
|
||||
;uploads = /var/lib/asterisk/uploads/
|
||||
;
|
||||
|
||||
;[uripath]
|
||||
;
|
||||
;type = restriction ; Specifies acl configuration
|
||||
;
|
||||
; The following options (permit, deny, acl) allow for an acl to be configured
|
||||
; on a per uri prefix basis. The first character should be an '/'
|
||||
;
|
||||
; The format follows the rules as documented in acl.conf.sample
|
||||
;
|
||||
; If no restriction is defined for a given prefix, legacy behavior will apply.
|
||||
;
|
||||
; If multiple restrictions apply, any restriction that denies will supersede
|
||||
; any another restrictions that permit. For example if an /ari restriction
|
||||
; results in a deny, but an /ari/channels restriction would permit, the
|
||||
; attempt would still be denied.
|
||||
;
|
||||
;deny = ; Deny the subnet access for the given user
|
||||
;permit = ; Permit the subnet(s) access for the given user
|
||||
;acl = ; Optional name for the acl.
|
||||
;
|
||||
;Examples:
|
||||
;
|
||||
; Only allow ari connections from localhost:
|
||||
;
|
||||
;[/ari]
|
||||
;type = restriction
|
||||
;deny = 0.0.0.0/0
|
||||
;permit = 127.0.0.1
|
||||
;acl = localarionly
|
||||
;
|
||||
; Only allow metrics to be gathered by 10.0.0.23
|
||||
;
|
||||
;[/metrics]
|
||||
;type = restriction
|
||||
;deny = 0.0.0.0/0
|
||||
;permit = 10.0.0.23
|
||||
;
|
||||
Reference in New Issue
Block a user