io.helidon.security.EndpointConfig Maven / Gradle / Ivy
/*
* Copyright (c) 2018, 2020 Oracle and/or its affiliates.
*
* 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 io.helidon.security;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Optional;
import io.helidon.config.Config;
import io.helidon.security.spi.SecurityProvider;
import io.helidon.security.util.AbacSupport;
/**
* Each endpoint can have security configuration either statically declared (e.g. annotations) or
* dynamically provided through manual security request.
* This class covers all kinds of configurations supported:
*
* - Annotations as gathered by the integration component (e.g. from Jersey resource class and method)
* - Configuration as read from a configuration resource (e.g. when integrating web server)
* - Attributes (key/value) configured by a programmer
* - Custom objects configured by a programmer
*
*
* Each provider defines annotations, configuration keys, attributes and custom objects it supports and expects.
*
* @see SecurityProvider#supportedAnnotations
* @see SecurityProvider#supportedCustomObjects
* @see SecurityProvider#supportedConfigKeys
* @see SecurityProvider#supportedAttributes
*/
public class EndpointConfig implements AbacSupport {
private final List securityLevels;
private final AbacSupport attributes;
private final ClassToInstanceStore
© 2015 - 2024 Weber Informatics LLC | Privacy Policy