RPC_server.Aclinclude module type of Resto_acl.Acltype path_matcher = Resto_acl__Acl.path_matcher = | Exact of chunk_matcher list| FollowedByAnySuffix of chunk_matcher listval parse : string -> matcherval to_string : matcher -> stringval allowed : t -> meth:Resto.meth -> path:string list -> boolA policy for the whole RPC server is a set of access control lists for the different addresses that the RPC server listens to. It is represented as an association list mapping listening addresses (in string literal forms) to deny/access access policies.
val secure : tDefault ACL policy in case none is defined in configuration. It only exposes such endpoints that are necessary for the node to allow clients to make use of their Tez. It applies to all listening addresses except for localhost (see allow_all for this address).
val allow_all : tAn allow-all policy, which is the default for the localhost listening address.
val default : Mavryk_base.TzPervasives.P2p_addr.t -> tSelects default ACL based on listening address. Selects allow_all for loopback addresses and secure for everything else.
val put_policy :
(Mavryk_base.TzPervasives.P2p_point.Id.addr_port_id * t) ->
policy ->
policyAdd an ACL for given address into the policy. Overrides previously existing policy for that address if any.
val empty_policy : policyEmpty ACL policy allows access to all endpoints. Currently it's the same as default below, but that will likely change in the future, therefore it's better to use default rather than this value. It's mainly intended for testing.
val policy_type : t -> stringpolicy_type p returns the "type" of p, either "Secure" or "AllowAll" or "Custom".
val policy_encoding : policy Mavryk_base.TzPervasives.Data_encoding.tval policy_to_string : policy -> stringReturns the JSON representation of the policy.
find_policy policy address looks for the address within the policy and returns corresponding access control list.
An ACL is considered matching if its corresponding IP part matches the IP part of the address and either:
address's port ORThe first ACL whose corresponding address matches these criteria is returned.
val matcher_to_string : matcher -> stringReturns string representation of a given matcher. Useful for testing.
val acl_type : t -> [ `Whitelist | `Blacklist ]Returns the ACL type, either `Whitelist or `Blacklist.
Replace domain-name addresses in the policy with the IP addresses they resolve to.
resolve_domain_names p returns a policy equivalent to p but with all domain-name addresses resolved to IPs. This is useful to make it easier to match them with listening addresses given to the server.
module Internal_for_test : sig ... end