Documentation ¶
Overview ¶
Copyright (C) 2018 Yahoo Japan Corporation Athenz team.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Package authorizerd represents the policy updater daemon.
Copyright (C) 2018 Yahoo Japan Corporation Athenz team.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright (C) 2018 Yahoo Japan Corporation Athenz team.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright (C) 2018 Yahoo Japan Corporation Athenz team.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Index ¶
- Variables
- type Authorizerd
- type Option
- func WithAthenzDomains(domains ...string) Option
- func WithAthenzURL(url string) Option
- func WithCacheExp(exp time.Duration) Option
- func WithDisableJwkd() Option
- func WithDisablePolicyd() Option
- func WithDisablePubkeyd() Option
- func WithEnableJwkd() Option
- func WithEnablePolicyd() Option
- func WithEnablePubkeyd() Option
- func WithJwkErrRetryInterval(i string) Option
- func WithJwkRefreshDuration(t string) Option
- func WithPolicyErrRetryInterval(i string) Option
- func WithPolicyEtagExpTime(t string) Option
- func WithPolicyEtagFlushDuration(t string) Option
- func WithPolicyExpireMargin(t string) Option
- func WithPolicyRefreshDuration(t string) Option
- func WithPubkeyErrRetryInterval(i string) Option
- func WithPubkeyEtagExpTime(t string) Option
- func WithPubkeyEtagFlushDuration(t string) Option
- func WithPubkeyRefreshDuration(t string) Option
- func WithPubkeySysAuthDomain(domain string) Option
- func WithRoleCertURIPrefix(t string) Option
- func WithTransport(t *http.Transport) Option
Constants ¶
This section is empty.
Variables ¶
var ( // ErrRoleTokenInvalid "Access denied due to invalid RoleToken" ErrRoleTokenInvalid = role.ErrRoleTokenInvalid // ErrRoleTokenExpired "Access denied due to expired RoleToken" ErrRoleTokenExpired = role.ErrRoleTokenExpired // ErrDomainMismatch "Access denied due to domain mismatch between Resource and RoleToken" ErrDomainMismatch = policy.ErrDomainMismatch // ErrDomainNotFound "Access denied due to domain not found in library cache" ErrDomainNotFound = policy.ErrDomainNotFound // ErrDomainExpired "Access denied due to expired domain policy file" ErrDomainExpired = policy.ErrDomainExpired // ErrNoMatch "Access denied due to no match to any of the assertions defined in domain policy file" ErrNoMatch = policy.ErrNoMatch // ErrInvalidPolicyResource "Access denied due to invalid/empty policy resources" ErrInvalidPolicyResource = policy.ErrInvalidPolicyResource // ErrDenyByPolicy "Access Check was explicitly denied" ErrDenyByPolicy = policy.ErrDenyByPolicy // ErrFetchPolicy "Error fetching athenz policy" ErrFetchPolicy = policy.ErrFetchPolicy // ErrInvalidParameters "Access denied due to invalid/empty action/resource values" ErrInvalidParameters = errors.New("Access denied due to invalid/empty action/resource values") )
Functions ¶
This section is empty.
Types ¶
type Authorizerd ¶
type Authorizerd interface { Start(ctx context.Context) <-chan error VerifyRoleToken(ctx context.Context, tok, act, res string) error VerifyRoleJWT(ctx context.Context, tok, act, res string) error VerifyRoleCert(ctx context.Context, peerCerts []*x509.Certificate, act, res string) error GetPolicyCache(ctx context.Context) map[string]interface{} }
Authorizerd represents a daemon for user to verify the role token
func New ¶
func New(opts ...Option) (Authorizerd, error)
New return Authorizerd This function will initialize the Authorizerd object with the options
type Option ¶
type Option func(*authorizer) error
Option represents a functional options pattern interface
func WithAthenzDomains ¶
WithAthenzDomains represents a AthenzDomains functional option
func WithAthenzURL ¶
WithAthenzURL represents a AthenzURL functional option
func WithCacheExp ¶
WithCacheExp represents the cache expiration time
func WithDisableJwkd ¶
func WithDisableJwkd() Option
WithDisableJwkd represents a DisableJwkd functional optiond
func WithDisablePolicyd ¶
func WithDisablePolicyd() Option
WithDisablePolicyd represents a DisablePolicyd functional optiond
func WithDisablePubkeyd ¶
func WithDisablePubkeyd() Option
WithDisablePubkeyd represents a DisablePubkey functional optiond
func WithEnableJwkd ¶
func WithEnableJwkd() Option
WithEnableJwkd represents a EnableJwkd functional optiond
func WithEnablePolicyd ¶
func WithEnablePolicyd() Option
WithEnablePolicyd represents a EnablePolicyd functional optiond
func WithEnablePubkeyd ¶
func WithEnablePubkeyd() Option
WithEnablePubkeyd represents a EnablePubkey functional optiond
func WithJwkErrRetryInterval ¶
WithJwkErrRetryInterval represents a JwkErrRetryInterval functional option
func WithJwkRefreshDuration ¶
WithJwkRefreshDuration represents a JwkRefreshDuration functional option
func WithPolicyErrRetryInterval ¶
WithPolicyErrRetryInterval represents a PolicyErrRetryInterval functional option
func WithPolicyEtagExpTime ¶
WithPolicyEtagExpTime represents a PolicyEtagExpTime functional option
func WithPolicyEtagFlushDuration ¶
WithPolicyEtagFlushDuration represents a PolicyEtagFlushDur functional option
func WithPolicyExpireMargin ¶
WithPolicyExpireMargin represents a PolicyExpireMargin functional option
func WithPolicyRefreshDuration ¶
WithPolicyRefreshDuration represents a PolicyRefreshDuration functional option
func WithPubkeyErrRetryInterval ¶
WithPubkeyErrRetryInterval represents a PubkeyErrRetryInterval functional option
func WithPubkeyEtagExpTime ¶
WithPubkeyEtagExpTime represents a PubkeyEtagExpTime functional option
func WithPubkeyEtagFlushDuration ¶
WithPubkeyEtagFlushDuration represents a PubkeyEtagFlushDur functional option
func WithPubkeyRefreshDuration ¶
WithPubkeyRefreshDuration represents a PubkeyRefreshDuration functional option
func WithPubkeySysAuthDomain ¶
WithPubkeySysAuthDomain represents a PubkeySysAuthDomain functional option
func WithRoleCertURIPrefix ¶
WithRoleCertURIPrefix represents a RoleCertURIPrefix functional option
func WithTransport ¶
WithTransport represents a Transport functional option