You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by "Kinae (via GitHub)" <gi...@apache.org> on 2023/01/30 10:20:59 UTC

[GitHub] [camel-spring-boot] Kinae opened a new pull request, #721: CAMEL-18984 camel-undertow-spring-security-starter - Migrate to Spring Boot 3

Kinae opened a new pull request, #721:
URL: https://github.com/apache/camel-spring-boot/pull/721

   This reverts commit a1b2af71dace2279b5743a4d0fc3921f6d0f8bfe.
   
   CAMEL-18984 camel-undertow-spring-security-starter - Migrate to Spring Boot 3


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [camel-spring-boot] davsclaus commented on a diff in pull request #721: CAMEL-18984 camel-undertow-spring-security-starter - Migrate to Spring Boot 3

Posted by "davsclaus (via GitHub)" <gi...@apache.org>.
davsclaus commented on code in PR #721:
URL: https://github.com/apache/camel-spring-boot/pull/721#discussion_r1090476453


##########
components-starter/camel-undertow-spring-security-starter/src/main/java/org/apache/camel/undertow/spring/boot/UndertowSpringSecurityCustomizer.java:
##########
@@ -0,0 +1,153 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You 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 org.apache.camel.undertow.spring.boot;
+
+import org.apache.camel.Component;
+import org.apache.camel.component.spring.security.SpringSecurityConfiguration;
+import org.apache.camel.component.spring.security.keycloak.KeycloakUsernameSubClaimAdapter;
+import org.apache.camel.component.undertow.UndertowComponent;
+import org.apache.camel.spi.ComponentCustomizer;
+import org.apache.camel.spring.boot.CamelAutoConfiguration;
+import org.apache.camel.undertow.spring.boot.providers.AbstractProviderConfiguration;
+import org.apache.camel.spring.boot.ComponentConfigurationProperties;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.boot.autoconfigure.AutoConfigureAfter;
+import org.springframework.boot.context.properties.EnableConfigurationProperties;
+import org.springframework.boot.web.servlet.DelegatingFilterProxyRegistrationBean;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.security.config.annotation.web.builders.HttpSecurity;
+import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity;
+import org.springframework.security.config.http.SessionCreationPolicy;
+import org.springframework.security.oauth2.client.InMemoryOAuth2AuthorizedClientService;
+import org.springframework.security.oauth2.client.OAuth2AuthorizedClientService;
+import org.springframework.security.oauth2.client.registration.ClientRegistration;
+import org.springframework.security.oauth2.client.registration.ClientRegistrationRepository;
+import org.springframework.security.oauth2.client.registration.InMemoryClientRegistrationRepository;
+import org.springframework.security.oauth2.jwt.JwtDecoder;
+import org.springframework.security.oauth2.jwt.NimbusJwtDecoder;
+import org.springframework.security.web.SecurityFilterChain;
+
+import java.net.URISyntaxException;
+import java.util.Collections;
+import java.util.LinkedList;
+
+/**
+ * Configuration of spring-security constraints for defined providers.
+ */
+@Configuration(proxyBeanMethods = false)

Review Comment:
   Yeah if there is any configuration then you need that file. You are welcome to send a PR



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [camel-spring-boot] Croway commented on a diff in pull request #721: CAMEL-18984 camel-undertow-spring-security-starter - Migrate to Spring Boot 3

Posted by "Croway (via GitHub)" <gi...@apache.org>.
Croway commented on code in PR #721:
URL: https://github.com/apache/camel-spring-boot/pull/721#discussion_r1090474413


##########
components-starter/camel-undertow-spring-security-starter/src/main/java/org/apache/camel/undertow/spring/boot/UndertowSpringSecurityCustomizer.java:
##########
@@ -0,0 +1,153 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You 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 org.apache.camel.undertow.spring.boot;
+
+import org.apache.camel.Component;
+import org.apache.camel.component.spring.security.SpringSecurityConfiguration;
+import org.apache.camel.component.spring.security.keycloak.KeycloakUsernameSubClaimAdapter;
+import org.apache.camel.component.undertow.UndertowComponent;
+import org.apache.camel.spi.ComponentCustomizer;
+import org.apache.camel.spring.boot.CamelAutoConfiguration;
+import org.apache.camel.undertow.spring.boot.providers.AbstractProviderConfiguration;
+import org.apache.camel.spring.boot.ComponentConfigurationProperties;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.boot.autoconfigure.AutoConfigureAfter;
+import org.springframework.boot.context.properties.EnableConfigurationProperties;
+import org.springframework.boot.web.servlet.DelegatingFilterProxyRegistrationBean;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.security.config.annotation.web.builders.HttpSecurity;
+import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity;
+import org.springframework.security.config.http.SessionCreationPolicy;
+import org.springframework.security.oauth2.client.InMemoryOAuth2AuthorizedClientService;
+import org.springframework.security.oauth2.client.OAuth2AuthorizedClientService;
+import org.springframework.security.oauth2.client.registration.ClientRegistration;
+import org.springframework.security.oauth2.client.registration.ClientRegistrationRepository;
+import org.springframework.security.oauth2.client.registration.InMemoryClientRegistrationRepository;
+import org.springframework.security.oauth2.jwt.JwtDecoder;
+import org.springframework.security.oauth2.jwt.NimbusJwtDecoder;
+import org.springframework.security.web.SecurityFilterChain;
+
+import java.net.URISyntaxException;
+import java.util.Collections;
+import java.util.LinkedList;
+
+/**
+ * Configuration of spring-security constraints for defined providers.
+ */
+@Configuration(proxyBeanMethods = false)

Review Comment:
   Is it enough in a real project? shouldn't `org.springframework.boot.autoconfigure.AutoConfiguration.imports` be added under META-INF?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [camel-spring-boot] davsclaus merged pull request #721: CAMEL-18984 camel-undertow-spring-security-starter - Migrate to Spring Boot 3

Posted by "davsclaus (via GitHub)" <gi...@apache.org>.
davsclaus merged PR #721:
URL: https://github.com/apache/camel-spring-boot/pull/721


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [camel-spring-boot] davsclaus commented on a diff in pull request #721: CAMEL-18984 camel-undertow-spring-security-starter - Migrate to Spring Boot 3

Posted by "davsclaus (via GitHub)" <gi...@apache.org>.
davsclaus commented on code in PR #721:
URL: https://github.com/apache/camel-spring-boot/pull/721#discussion_r1090519878


##########
components-starter/camel-undertow-spring-security-starter/src/main/java/org/apache/camel/undertow/spring/boot/UndertowSpringSecurityCustomizer.java:
##########
@@ -0,0 +1,153 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You 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 org.apache.camel.undertow.spring.boot;
+
+import org.apache.camel.Component;
+import org.apache.camel.component.spring.security.SpringSecurityConfiguration;
+import org.apache.camel.component.spring.security.keycloak.KeycloakUsernameSubClaimAdapter;
+import org.apache.camel.component.undertow.UndertowComponent;
+import org.apache.camel.spi.ComponentCustomizer;
+import org.apache.camel.spring.boot.CamelAutoConfiguration;
+import org.apache.camel.undertow.spring.boot.providers.AbstractProviderConfiguration;
+import org.apache.camel.spring.boot.ComponentConfigurationProperties;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.boot.autoconfigure.AutoConfigureAfter;
+import org.springframework.boot.context.properties.EnableConfigurationProperties;
+import org.springframework.boot.web.servlet.DelegatingFilterProxyRegistrationBean;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.security.config.annotation.web.builders.HttpSecurity;
+import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity;
+import org.springframework.security.config.http.SessionCreationPolicy;
+import org.springframework.security.oauth2.client.InMemoryOAuth2AuthorizedClientService;
+import org.springframework.security.oauth2.client.OAuth2AuthorizedClientService;
+import org.springframework.security.oauth2.client.registration.ClientRegistration;
+import org.springframework.security.oauth2.client.registration.ClientRegistrationRepository;
+import org.springframework.security.oauth2.client.registration.InMemoryClientRegistrationRepository;
+import org.springframework.security.oauth2.jwt.JwtDecoder;
+import org.springframework.security.oauth2.jwt.NimbusJwtDecoder;
+import org.springframework.security.web.SecurityFilterChain;
+
+import java.net.URISyntaxException;
+import java.util.Collections;
+import java.util.LinkedList;
+
+/**
+ * Configuration of spring-security constraints for defined providers.
+ */
+@Configuration(proxyBeanMethods = false)

Review Comment:
   I assume the import file need to contain `org.apache.camel.undertow.spring.boot.UndertowSpringSecurityConfiguration`



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org