From fc0bf2a6996c36fb44d51a585d61954a1deb5d19 Mon Sep 17 00:00:00 2001 From: dhairya05 Date: Sat, 14 Nov 2026 23:46:38 +0530 Subject: [PATCH 1/3] camel-keycloak: deprecate 11 documented headers that nothing reads KeycloakProducer reads every header it honours explicitly by constant, and 11 of the 66 headers KeycloakConstants publishes appear nowhere in the main sources - not read, not written, not even in a test. They are not arbitrary: each sits next to one that does work, so the docs read as if a whole set were supported. * CamelKeycloakRoleId - the role operations take CamelKeycloakRoleName * CamelKeycloakIdpId - the identity provider operations take CamelKeycloakIdpAlias * CamelKeycloakResourceName/Type/Uri, CamelKeycloakPolicyName/Type, CamelKeycloakPermissionName, CamelKeycloakScopeName, CamelKeycloakCredentialType - the authorization-services and credential operations take a representation as the POJO request body; createResource for instance throws "Create resource requires POJO request with ResourceRepresentation" when pojoRequest is off, and never looks at the headers * CamelKeycloakBatchSize - the bulk operations iterate the whole list one element at a time; there is no batching to size Each is deprecated with a deprecationNote naming what to use instead, the way influxdb2's camelInfluxDB.RetentionPolicy was handled. The constants stay, so nothing stops compiling. --- .../camel/catalog/components/keycloak.json | 22 ++++---- .../camel/component/keycloak/keycloak.json | 22 ++++---- .../component/keycloak/KeycloakConstants.java | 55 +++++++++++++++---- 3 files changed, 66 insertions(+), 33 deletions(-) diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/keycloak.json b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/keycloak.json index 82304260708c0..9d27f1197231c 100644 --- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/keycloak.json +++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/keycloak.json @@ -67,7 +67,7 @@ "CamelKeycloakUserEmail": { "index": 4, "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "String", "deprecated": false, "autowired": false, "secret": false, "description": "The user email", "constantName": "org.apache.camel.component.keycloak.KeycloakConstants#USER_EMAIL" }, "CamelKeycloakUserFirstName": { "index": 5, "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "String", "deprecated": false, "autowired": false, "secret": false, "description": "The user first name", "constantName": "org.apache.camel.component.keycloak.KeycloakConstants#USER_FIRST_NAME" }, "CamelKeycloakUserLastName": { "index": 6, "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "String", "deprecated": false, "autowired": false, "secret": false, "description": "The user last name", "constantName": "org.apache.camel.component.keycloak.KeycloakConstants#USER_LAST_NAME" }, - "CamelKeycloakRoleId": { "index": 7, "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "String", "deprecated": false, "autowired": false, "secret": false, "description": "The role ID", "constantName": "org.apache.camel.component.keycloak.KeycloakConstants#ROLE_ID" }, + "CamelKeycloakRoleId": { "index": 7, "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "String", "deprecated": true, "deprecationNote": "Never read by the component: the role operations address a role by its name (CamelKeycloakRoleName)", "autowired": false, "secret": false, "description": "The role ID. Deprecation note: Never read by the component: the role operations address a role by its name (CamelKeycloakRoleName)", "constantName": "org.apache.camel.component.keycloak.KeycloakConstants#ROLE_ID" }, "CamelKeycloakRoleName": { "index": 8, "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "String", "deprecated": false, "autowired": false, "secret": false, "description": "The role name", "constantName": "org.apache.camel.component.keycloak.KeycloakConstants#ROLE_NAME" }, "CamelKeycloakRoleDescription": { "index": 9, "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "String", "deprecated": false, "autowired": false, "secret": false, "description": "The role description", "constantName": "org.apache.camel.component.keycloak.KeycloakConstants#ROLE_DESCRIPTION" }, "CamelKeycloakGroupId": { "index": 10, "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "String", "deprecated": false, "autowired": false, "secret": false, "description": "The group ID", "constantName": "org.apache.camel.component.keycloak.KeycloakConstants#GROUP_ID" }, @@ -84,21 +84,21 @@ "CamelKeycloakEventType": { "index": 21, "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "String", "deprecated": false, "autowired": false, "secret": false, "description": "The event type (event or admin-event)", "constantName": "org.apache.camel.component.keycloak.KeycloakConstants#EVENT_TYPE" }, "CamelKeycloakEventId": { "index": 22, "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "Long", "deprecated": false, "autowired": false, "secret": false, "description": "The event ID or timestamp", "constantName": "org.apache.camel.component.keycloak.KeycloakConstants#EVENT_ID" }, "CamelKeycloakIdpAlias": { "index": 23, "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "String", "deprecated": false, "autowired": false, "secret": false, "description": "The identity provider alias", "constantName": "org.apache.camel.component.keycloak.KeycloakConstants#IDP_ALIAS" }, - "CamelKeycloakIdpId": { "index": 24, "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "String", "deprecated": false, "autowired": false, "secret": false, "description": "The identity provider ID", "constantName": "org.apache.camel.component.keycloak.KeycloakConstants#IDP_ID" }, + "CamelKeycloakIdpId": { "index": 24, "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "String", "deprecated": true, "deprecationNote": "Never read by the component: the identity provider operations address a provider by its alias (CamelKeycloakIdpAlias)", "autowired": false, "secret": false, "description": "The identity provider ID. Deprecation note: Never read by the component: the identity provider operations address a provider by its alias (CamelKeycloakIdpAlias)", "constantName": "org.apache.camel.component.keycloak.KeycloakConstants#IDP_ID" }, "CamelKeycloakResourceId": { "index": 25, "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "String", "deprecated": false, "autowired": false, "secret": false, "description": "The resource ID", "constantName": "org.apache.camel.component.keycloak.KeycloakConstants#RESOURCE_ID" }, - "CamelKeycloakResourceName": { "index": 26, "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "String", "deprecated": false, "autowired": false, "secret": false, "description": "The resource name", "constantName": "org.apache.camel.component.keycloak.KeycloakConstants#RESOURCE_NAME" }, - "CamelKeycloakResourceType": { "index": 27, "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "String", "deprecated": false, "autowired": false, "secret": false, "description": "The resource type", "constantName": "org.apache.camel.component.keycloak.KeycloakConstants#RESOURCE_TYPE" }, - "CamelKeycloakResourceUri": { "index": 28, "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "String", "deprecated": false, "autowired": false, "secret": false, "description": "The resource URI", "constantName": "org.apache.camel.component.keycloak.KeycloakConstants#RESOURCE_URI" }, + "CamelKeycloakResourceName": { "index": 26, "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "String", "deprecated": true, "deprecationNote": "Never read by the component: createResource and updateResource take a ResourceRepresentation as the POJO request body", "autowired": false, "secret": false, "description": "The resource name. Deprecation note: Never read by the component: createResource and updateResource take a ResourceRepresentation as the POJO request body", "constantName": "org.apache.camel.component.keycloak.KeycloakConstants#RESOURCE_NAME" }, + "CamelKeycloakResourceType": { "index": 27, "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "String", "deprecated": true, "deprecationNote": "Never read by the component: createResource and updateResource take a ResourceRepresentation as the POJO request body", "autowired": false, "secret": false, "description": "The resource type. Deprecation note: Never read by the component: createResource and updateResource take a ResourceRepresentation as the POJO request body", "constantName": "org.apache.camel.component.keycloak.KeycloakConstants#RESOURCE_TYPE" }, + "CamelKeycloakResourceUri": { "index": 28, "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "String", "deprecated": true, "deprecationNote": "Never read by the component: createResource and updateResource take a ResourceRepresentation as the POJO request body", "autowired": false, "secret": false, "description": "The resource URI. Deprecation note: Never read by the component: createResource and updateResource take a ResourceRepresentation as the POJO request body", "constantName": "org.apache.camel.component.keycloak.KeycloakConstants#RESOURCE_URI" }, "CamelKeycloakPolicyId": { "index": 29, "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "String", "deprecated": false, "autowired": false, "secret": false, "description": "The policy ID", "constantName": "org.apache.camel.component.keycloak.KeycloakConstants#POLICY_ID" }, - "CamelKeycloakPolicyName": { "index": 30, "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "String", "deprecated": false, "autowired": false, "secret": false, "description": "The policy name", "constantName": "org.apache.camel.component.keycloak.KeycloakConstants#POLICY_NAME" }, - "CamelKeycloakPolicyType": { "index": 31, "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "String", "deprecated": false, "autowired": false, "secret": false, "description": "The policy type", "constantName": "org.apache.camel.component.keycloak.KeycloakConstants#POLICY_TYPE" }, + "CamelKeycloakPolicyName": { "index": 30, "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "String", "deprecated": true, "deprecationNote": "Never read by the component: the resource policy operations take a PolicyRepresentation as the POJO request body", "autowired": false, "secret": false, "description": "The policy name. Deprecation note: Never read by the component: the resource policy operations take a PolicyRepresentation as the POJO request body", "constantName": "org.apache.camel.component.keycloak.KeycloakConstants#POLICY_NAME" }, + "CamelKeycloakPolicyType": { "index": 31, "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "String", "deprecated": true, "deprecationNote": "Never read by the component: the resource policy operations take a PolicyRepresentation as the POJO request body", "autowired": false, "secret": false, "description": "The policy type. Deprecation note: Never read by the component: the resource policy operations take a PolicyRepresentation as the POJO request body", "constantName": "org.apache.camel.component.keycloak.KeycloakConstants#POLICY_TYPE" }, "CamelKeycloakPermissionId": { "index": 32, "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "String", "deprecated": false, "autowired": false, "secret": false, "description": "The permission ID", "constantName": "org.apache.camel.component.keycloak.KeycloakConstants#PERMISSION_ID" }, - "CamelKeycloakPermissionName": { "index": 33, "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "String", "deprecated": false, "autowired": false, "secret": false, "description": "The permission name", "constantName": "org.apache.camel.component.keycloak.KeycloakConstants#PERMISSION_NAME" }, - "CamelKeycloakScopeName": { "index": 34, "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "String", "deprecated": false, "autowired": false, "secret": false, "description": "The scope name", "constantName": "org.apache.camel.component.keycloak.KeycloakConstants#SCOPE_NAME" }, + "CamelKeycloakPermissionName": { "index": 33, "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "String", "deprecated": true, "deprecationNote": "Never read by the component: the resource permission operations take a PolicyRepresentation as the POJO request body", "autowired": false, "secret": false, "description": "The permission name. Deprecation note: Never read by the component: the resource permission operations take a PolicyRepresentation as the POJO request body", "constantName": "org.apache.camel.component.keycloak.KeycloakConstants#PERMISSION_NAME" }, + "CamelKeycloakScopeName": { "index": 34, "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "String", "deprecated": true, "deprecationNote": "Never read by the component: the scope operations take their representation as the POJO request body", "autowired": false, "secret": false, "description": "The scope name. Deprecation note: Never read by the component: the scope operations take their representation as the POJO request body", "constantName": "org.apache.camel.component.keycloak.KeycloakConstants#SCOPE_NAME" }, "CamelKeycloakAttributeName": { "index": 35, "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "String", "deprecated": false, "autowired": false, "secret": false, "description": "The user attribute name", "constantName": "org.apache.camel.component.keycloak.KeycloakConstants#ATTRIBUTE_NAME" }, "CamelKeycloakAttributeValue": { "index": 36, "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "String", "deprecated": false, "autowired": false, "secret": false, "description": "The user attribute value", "constantName": "org.apache.camel.component.keycloak.KeycloakConstants#ATTRIBUTE_VALUE" }, "CamelKeycloakCredentialId": { "index": 37, "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "String", "deprecated": false, "autowired": false, "secret": false, "description": "The credential ID", "constantName": "org.apache.camel.component.keycloak.KeycloakConstants#CREDENTIAL_ID" }, - "CamelKeycloakCredentialType": { "index": 38, "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "String", "deprecated": false, "autowired": false, "secret": false, "description": "The credential type", "constantName": "org.apache.camel.component.keycloak.KeycloakConstants#CREDENTIAL_TYPE" }, + "CamelKeycloakCredentialType": { "index": 38, "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "String", "deprecated": true, "deprecationNote": "Never read by the component: the credential operations take a CredentialRepresentation as the POJO request body", "autowired": false, "secret": false, "description": "The credential type. Deprecation note: Never read by the component: the credential operations take a CredentialRepresentation as the POJO request body", "constantName": "org.apache.camel.component.keycloak.KeycloakConstants#CREDENTIAL_TYPE" }, "CamelKeycloakRequiredAction": { "index": 39, "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "String", "deprecated": false, "autowired": false, "secret": false, "description": "The required action type", "constantName": "org.apache.camel.component.keycloak.KeycloakConstants#REQUIRED_ACTION" }, "CamelKeycloakActions": { "index": 40, "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "java.util.List", "deprecated": false, "autowired": false, "secret": false, "description": "The list of actions to execute", "constantName": "org.apache.camel.component.keycloak.KeycloakConstants#ACTIONS" }, "CamelKeycloakRedirectUri": { "index": 41, "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "String", "deprecated": false, "autowired": false, "secret": false, "description": "The redirect URI", "constantName": "org.apache.camel.component.keycloak.KeycloakConstants#REDIRECT_URI" }, @@ -108,7 +108,7 @@ "CamelKeycloakUsernames": { "index": 45, "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "java.util.List", "deprecated": false, "autowired": false, "secret": false, "description": "The list of usernames for bulk operations", "constantName": "org.apache.camel.component.keycloak.KeycloakConstants#USERNAMES" }, "CamelKeycloakRoleNames": { "index": 46, "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "java.util.List", "deprecated": false, "autowired": false, "secret": false, "description": "The list of role names for bulk operations", "constantName": "org.apache.camel.component.keycloak.KeycloakConstants#ROLE_NAMES" }, "CamelKeycloakContinueOnError": { "index": 47, "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "Boolean", "deprecated": false, "autowired": false, "secret": false, "description": "Continue on error during bulk operations", "constantName": "org.apache.camel.component.keycloak.KeycloakConstants#CONTINUE_ON_ERROR" }, - "CamelKeycloakBatchSize": { "index": 48, "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "Integer", "deprecated": false, "autowired": false, "secret": false, "description": "Batch size for bulk operations", "constantName": "org.apache.camel.component.keycloak.KeycloakConstants#BATCH_SIZE" }, + "CamelKeycloakBatchSize": { "index": 48, "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "Integer", "deprecated": true, "deprecationNote": "Never read by the component: the bulk operations send every element of the list one by one, with no batching", "autowired": false, "secret": false, "description": "Batch size for bulk operations. Deprecation note: Never read by the component: the bulk operations send every element of the list one by one, with no batching", "constantName": "org.apache.camel.component.keycloak.KeycloakConstants#BATCH_SIZE" }, "CamelKeycloakAccessToken": { "index": 49, "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "String", "deprecated": false, "autowired": false, "secret": false, "description": "The access token for permission evaluation", "constantName": "org.apache.camel.component.keycloak.KeycloakConstants#ACCESS_TOKEN" }, "CamelKeycloakToken": { "index": 50, "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "String", "deprecated": false, "autowired": false, "secret": false, "description": "The token for revocation or introspection", "constantName": "org.apache.camel.component.keycloak.KeycloakConstants#TOKEN" }, "CamelKeycloakTokenTypeHint": { "index": 51, "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "String", "deprecated": false, "autowired": false, "secret": false, "description": "The token type hint for revocation", "constantName": "org.apache.camel.component.keycloak.KeycloakConstants#TOKEN_TYPE_HINT" }, diff --git a/components/camel-keycloak/src/generated/resources/META-INF/org/apache/camel/component/keycloak/keycloak.json b/components/camel-keycloak/src/generated/resources/META-INF/org/apache/camel/component/keycloak/keycloak.json index 82304260708c0..9d27f1197231c 100644 --- a/components/camel-keycloak/src/generated/resources/META-INF/org/apache/camel/component/keycloak/keycloak.json +++ b/components/camel-keycloak/src/generated/resources/META-INF/org/apache/camel/component/keycloak/keycloak.json @@ -67,7 +67,7 @@ "CamelKeycloakUserEmail": { "index": 4, "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "String", "deprecated": false, "autowired": false, "secret": false, "description": "The user email", "constantName": "org.apache.camel.component.keycloak.KeycloakConstants#USER_EMAIL" }, "CamelKeycloakUserFirstName": { "index": 5, "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "String", "deprecated": false, "autowired": false, "secret": false, "description": "The user first name", "constantName": "org.apache.camel.component.keycloak.KeycloakConstants#USER_FIRST_NAME" }, "CamelKeycloakUserLastName": { "index": 6, "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "String", "deprecated": false, "autowired": false, "secret": false, "description": "The user last name", "constantName": "org.apache.camel.component.keycloak.KeycloakConstants#USER_LAST_NAME" }, - "CamelKeycloakRoleId": { "index": 7, "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "String", "deprecated": false, "autowired": false, "secret": false, "description": "The role ID", "constantName": "org.apache.camel.component.keycloak.KeycloakConstants#ROLE_ID" }, + "CamelKeycloakRoleId": { "index": 7, "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "String", "deprecated": true, "deprecationNote": "Never read by the component: the role operations address a role by its name (CamelKeycloakRoleName)", "autowired": false, "secret": false, "description": "The role ID. Deprecation note: Never read by the component: the role operations address a role by its name (CamelKeycloakRoleName)", "constantName": "org.apache.camel.component.keycloak.KeycloakConstants#ROLE_ID" }, "CamelKeycloakRoleName": { "index": 8, "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "String", "deprecated": false, "autowired": false, "secret": false, "description": "The role name", "constantName": "org.apache.camel.component.keycloak.KeycloakConstants#ROLE_NAME" }, "CamelKeycloakRoleDescription": { "index": 9, "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "String", "deprecated": false, "autowired": false, "secret": false, "description": "The role description", "constantName": "org.apache.camel.component.keycloak.KeycloakConstants#ROLE_DESCRIPTION" }, "CamelKeycloakGroupId": { "index": 10, "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "String", "deprecated": false, "autowired": false, "secret": false, "description": "The group ID", "constantName": "org.apache.camel.component.keycloak.KeycloakConstants#GROUP_ID" }, @@ -84,21 +84,21 @@ "CamelKeycloakEventType": { "index": 21, "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "String", "deprecated": false, "autowired": false, "secret": false, "description": "The event type (event or admin-event)", "constantName": "org.apache.camel.component.keycloak.KeycloakConstants#EVENT_TYPE" }, "CamelKeycloakEventId": { "index": 22, "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "Long", "deprecated": false, "autowired": false, "secret": false, "description": "The event ID or timestamp", "constantName": "org.apache.camel.component.keycloak.KeycloakConstants#EVENT_ID" }, "CamelKeycloakIdpAlias": { "index": 23, "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "String", "deprecated": false, "autowired": false, "secret": false, "description": "The identity provider alias", "constantName": "org.apache.camel.component.keycloak.KeycloakConstants#IDP_ALIAS" }, - "CamelKeycloakIdpId": { "index": 24, "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "String", "deprecated": false, "autowired": false, "secret": false, "description": "The identity provider ID", "constantName": "org.apache.camel.component.keycloak.KeycloakConstants#IDP_ID" }, + "CamelKeycloakIdpId": { "index": 24, "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "String", "deprecated": true, "deprecationNote": "Never read by the component: the identity provider operations address a provider by its alias (CamelKeycloakIdpAlias)", "autowired": false, "secret": false, "description": "The identity provider ID. Deprecation note: Never read by the component: the identity provider operations address a provider by its alias (CamelKeycloakIdpAlias)", "constantName": "org.apache.camel.component.keycloak.KeycloakConstants#IDP_ID" }, "CamelKeycloakResourceId": { "index": 25, "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "String", "deprecated": false, "autowired": false, "secret": false, "description": "The resource ID", "constantName": "org.apache.camel.component.keycloak.KeycloakConstants#RESOURCE_ID" }, - "CamelKeycloakResourceName": { "index": 26, "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "String", "deprecated": false, "autowired": false, "secret": false, "description": "The resource name", "constantName": "org.apache.camel.component.keycloak.KeycloakConstants#RESOURCE_NAME" }, - "CamelKeycloakResourceType": { "index": 27, "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "String", "deprecated": false, "autowired": false, "secret": false, "description": "The resource type", "constantName": "org.apache.camel.component.keycloak.KeycloakConstants#RESOURCE_TYPE" }, - "CamelKeycloakResourceUri": { "index": 28, "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "String", "deprecated": false, "autowired": false, "secret": false, "description": "The resource URI", "constantName": "org.apache.camel.component.keycloak.KeycloakConstants#RESOURCE_URI" }, + "CamelKeycloakResourceName": { "index": 26, "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "String", "deprecated": true, "deprecationNote": "Never read by the component: createResource and updateResource take a ResourceRepresentation as the POJO request body", "autowired": false, "secret": false, "description": "The resource name. Deprecation note: Never read by the component: createResource and updateResource take a ResourceRepresentation as the POJO request body", "constantName": "org.apache.camel.component.keycloak.KeycloakConstants#RESOURCE_NAME" }, + "CamelKeycloakResourceType": { "index": 27, "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "String", "deprecated": true, "deprecationNote": "Never read by the component: createResource and updateResource take a ResourceRepresentation as the POJO request body", "autowired": false, "secret": false, "description": "The resource type. Deprecation note: Never read by the component: createResource and updateResource take a ResourceRepresentation as the POJO request body", "constantName": "org.apache.camel.component.keycloak.KeycloakConstants#RESOURCE_TYPE" }, + "CamelKeycloakResourceUri": { "index": 28, "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "String", "deprecated": true, "deprecationNote": "Never read by the component: createResource and updateResource take a ResourceRepresentation as the POJO request body", "autowired": false, "secret": false, "description": "The resource URI. Deprecation note: Never read by the component: createResource and updateResource take a ResourceRepresentation as the POJO request body", "constantName": "org.apache.camel.component.keycloak.KeycloakConstants#RESOURCE_URI" }, "CamelKeycloakPolicyId": { "index": 29, "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "String", "deprecated": false, "autowired": false, "secret": false, "description": "The policy ID", "constantName": "org.apache.camel.component.keycloak.KeycloakConstants#POLICY_ID" }, - "CamelKeycloakPolicyName": { "index": 30, "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "String", "deprecated": false, "autowired": false, "secret": false, "description": "The policy name", "constantName": "org.apache.camel.component.keycloak.KeycloakConstants#POLICY_NAME" }, - "CamelKeycloakPolicyType": { "index": 31, "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "String", "deprecated": false, "autowired": false, "secret": false, "description": "The policy type", "constantName": "org.apache.camel.component.keycloak.KeycloakConstants#POLICY_TYPE" }, + "CamelKeycloakPolicyName": { "index": 30, "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "String", "deprecated": true, "deprecationNote": "Never read by the component: the resource policy operations take a PolicyRepresentation as the POJO request body", "autowired": false, "secret": false, "description": "The policy name. Deprecation note: Never read by the component: the resource policy operations take a PolicyRepresentation as the POJO request body", "constantName": "org.apache.camel.component.keycloak.KeycloakConstants#POLICY_NAME" }, + "CamelKeycloakPolicyType": { "index": 31, "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "String", "deprecated": true, "deprecationNote": "Never read by the component: the resource policy operations take a PolicyRepresentation as the POJO request body", "autowired": false, "secret": false, "description": "The policy type. Deprecation note: Never read by the component: the resource policy operations take a PolicyRepresentation as the POJO request body", "constantName": "org.apache.camel.component.keycloak.KeycloakConstants#POLICY_TYPE" }, "CamelKeycloakPermissionId": { "index": 32, "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "String", "deprecated": false, "autowired": false, "secret": false, "description": "The permission ID", "constantName": "org.apache.camel.component.keycloak.KeycloakConstants#PERMISSION_ID" }, - "CamelKeycloakPermissionName": { "index": 33, "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "String", "deprecated": false, "autowired": false, "secret": false, "description": "The permission name", "constantName": "org.apache.camel.component.keycloak.KeycloakConstants#PERMISSION_NAME" }, - "CamelKeycloakScopeName": { "index": 34, "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "String", "deprecated": false, "autowired": false, "secret": false, "description": "The scope name", "constantName": "org.apache.camel.component.keycloak.KeycloakConstants#SCOPE_NAME" }, + "CamelKeycloakPermissionName": { "index": 33, "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "String", "deprecated": true, "deprecationNote": "Never read by the component: the resource permission operations take a PolicyRepresentation as the POJO request body", "autowired": false, "secret": false, "description": "The permission name. Deprecation note: Never read by the component: the resource permission operations take a PolicyRepresentation as the POJO request body", "constantName": "org.apache.camel.component.keycloak.KeycloakConstants#PERMISSION_NAME" }, + "CamelKeycloakScopeName": { "index": 34, "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "String", "deprecated": true, "deprecationNote": "Never read by the component: the scope operations take their representation as the POJO request body", "autowired": false, "secret": false, "description": "The scope name. Deprecation note: Never read by the component: the scope operations take their representation as the POJO request body", "constantName": "org.apache.camel.component.keycloak.KeycloakConstants#SCOPE_NAME" }, "CamelKeycloakAttributeName": { "index": 35, "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "String", "deprecated": false, "autowired": false, "secret": false, "description": "The user attribute name", "constantName": "org.apache.camel.component.keycloak.KeycloakConstants#ATTRIBUTE_NAME" }, "CamelKeycloakAttributeValue": { "index": 36, "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "String", "deprecated": false, "autowired": false, "secret": false, "description": "The user attribute value", "constantName": "org.apache.camel.component.keycloak.KeycloakConstants#ATTRIBUTE_VALUE" }, "CamelKeycloakCredentialId": { "index": 37, "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "String", "deprecated": false, "autowired": false, "secret": false, "description": "The credential ID", "constantName": "org.apache.camel.component.keycloak.KeycloakConstants#CREDENTIAL_ID" }, - "CamelKeycloakCredentialType": { "index": 38, "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "String", "deprecated": false, "autowired": false, "secret": false, "description": "The credential type", "constantName": "org.apache.camel.component.keycloak.KeycloakConstants#CREDENTIAL_TYPE" }, + "CamelKeycloakCredentialType": { "index": 38, "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "String", "deprecated": true, "deprecationNote": "Never read by the component: the credential operations take a CredentialRepresentation as the POJO request body", "autowired": false, "secret": false, "description": "The credential type. Deprecation note: Never read by the component: the credential operations take a CredentialRepresentation as the POJO request body", "constantName": "org.apache.camel.component.keycloak.KeycloakConstants#CREDENTIAL_TYPE" }, "CamelKeycloakRequiredAction": { "index": 39, "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "String", "deprecated": false, "autowired": false, "secret": false, "description": "The required action type", "constantName": "org.apache.camel.component.keycloak.KeycloakConstants#REQUIRED_ACTION" }, "CamelKeycloakActions": { "index": 40, "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "java.util.List", "deprecated": false, "autowired": false, "secret": false, "description": "The list of actions to execute", "constantName": "org.apache.camel.component.keycloak.KeycloakConstants#ACTIONS" }, "CamelKeycloakRedirectUri": { "index": 41, "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "String", "deprecated": false, "autowired": false, "secret": false, "description": "The redirect URI", "constantName": "org.apache.camel.component.keycloak.KeycloakConstants#REDIRECT_URI" }, @@ -108,7 +108,7 @@ "CamelKeycloakUsernames": { "index": 45, "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "java.util.List", "deprecated": false, "autowired": false, "secret": false, "description": "The list of usernames for bulk operations", "constantName": "org.apache.camel.component.keycloak.KeycloakConstants#USERNAMES" }, "CamelKeycloakRoleNames": { "index": 46, "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "java.util.List", "deprecated": false, "autowired": false, "secret": false, "description": "The list of role names for bulk operations", "constantName": "org.apache.camel.component.keycloak.KeycloakConstants#ROLE_NAMES" }, "CamelKeycloakContinueOnError": { "index": 47, "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "Boolean", "deprecated": false, "autowired": false, "secret": false, "description": "Continue on error during bulk operations", "constantName": "org.apache.camel.component.keycloak.KeycloakConstants#CONTINUE_ON_ERROR" }, - "CamelKeycloakBatchSize": { "index": 48, "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "Integer", "deprecated": false, "autowired": false, "secret": false, "description": "Batch size for bulk operations", "constantName": "org.apache.camel.component.keycloak.KeycloakConstants#BATCH_SIZE" }, + "CamelKeycloakBatchSize": { "index": 48, "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "Integer", "deprecated": true, "deprecationNote": "Never read by the component: the bulk operations send every element of the list one by one, with no batching", "autowired": false, "secret": false, "description": "Batch size for bulk operations. Deprecation note: Never read by the component: the bulk operations send every element of the list one by one, with no batching", "constantName": "org.apache.camel.component.keycloak.KeycloakConstants#BATCH_SIZE" }, "CamelKeycloakAccessToken": { "index": 49, "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "String", "deprecated": false, "autowired": false, "secret": false, "description": "The access token for permission evaluation", "constantName": "org.apache.camel.component.keycloak.KeycloakConstants#ACCESS_TOKEN" }, "CamelKeycloakToken": { "index": 50, "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "String", "deprecated": false, "autowired": false, "secret": false, "description": "The token for revocation or introspection", "constantName": "org.apache.camel.component.keycloak.KeycloakConstants#TOKEN" }, "CamelKeycloakTokenTypeHint": { "index": 51, "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "String", "deprecated": false, "autowired": false, "secret": false, "description": "The token type hint for revocation", "constantName": "org.apache.camel.component.keycloak.KeycloakConstants#TOKEN_TYPE_HINT" }, diff --git a/components/camel-keycloak/src/main/java/org/apache/camel/component/keycloak/KeycloakConstants.java b/components/camel-keycloak/src/main/java/org/apache/camel/component/keycloak/KeycloakConstants.java index 12949d97252ef..d675a85b2dd2a 100644 --- a/components/camel-keycloak/src/main/java/org/apache/camel/component/keycloak/KeycloakConstants.java +++ b/components/camel-keycloak/src/main/java/org/apache/camel/component/keycloak/KeycloakConstants.java @@ -44,7 +44,10 @@ public final class KeycloakConstants { @Metadata(description = "The user last name", javaType = "String") public static final String USER_LAST_NAME = "CamelKeycloakUserLastName"; - @Metadata(description = "The role ID", javaType = "String") + @Metadata(description = "The role ID", javaType = "String", + deprecationNote = "Never read by the component: the role operations address a role by its name" + + " (CamelKeycloakRoleName)") + @Deprecated public static final String ROLE_ID = "CamelKeycloakRoleId"; @Metadata(description = "The role name", javaType = "String") @@ -96,38 +99,62 @@ public final class KeycloakConstants { @Metadata(description = "The identity provider alias", javaType = "String") public static final String IDP_ALIAS = "CamelKeycloakIdpAlias"; - @Metadata(description = "The identity provider ID", javaType = "String") + @Metadata(description = "The identity provider ID", javaType = "String", + deprecationNote = "Never read by the component: the identity provider operations address a provider by its alias" + + " (CamelKeycloakIdpAlias)") + @Deprecated public static final String IDP_ID = "CamelKeycloakIdpId"; // Authorization Services constants @Metadata(description = "The resource ID", javaType = "String") public static final String RESOURCE_ID = "CamelKeycloakResourceId"; - @Metadata(description = "The resource name", javaType = "String") + @Metadata(description = "The resource name", javaType = "String", + deprecationNote = "Never read by the component: createResource and updateResource take a ResourceRepresentation" + + " as the POJO request body") + @Deprecated public static final String RESOURCE_NAME = "CamelKeycloakResourceName"; - @Metadata(description = "The resource type", javaType = "String") + @Metadata(description = "The resource type", javaType = "String", + deprecationNote = "Never read by the component: createResource and updateResource take a ResourceRepresentation" + + " as the POJO request body") + @Deprecated public static final String RESOURCE_TYPE = "CamelKeycloakResourceType"; - @Metadata(description = "The resource URI", javaType = "String") + @Metadata(description = "The resource URI", javaType = "String", + deprecationNote = "Never read by the component: createResource and updateResource take a ResourceRepresentation" + + " as the POJO request body") + @Deprecated public static final String RESOURCE_URI = "CamelKeycloakResourceUri"; @Metadata(description = "The policy ID", javaType = "String") public static final String POLICY_ID = "CamelKeycloakPolicyId"; - @Metadata(description = "The policy name", javaType = "String") + @Metadata(description = "The policy name", javaType = "String", + deprecationNote = "Never read by the component: the resource policy operations take a PolicyRepresentation as the" + + " POJO request body") + @Deprecated public static final String POLICY_NAME = "CamelKeycloakPolicyName"; - @Metadata(description = "The policy type", javaType = "String") + @Metadata(description = "The policy type", javaType = "String", + deprecationNote = "Never read by the component: the resource policy operations take a PolicyRepresentation as the" + + " POJO request body") + @Deprecated public static final String POLICY_TYPE = "CamelKeycloakPolicyType"; @Metadata(description = "The permission ID", javaType = "String") public static final String PERMISSION_ID = "CamelKeycloakPermissionId"; - @Metadata(description = "The permission name", javaType = "String") + @Metadata(description = "The permission name", javaType = "String", + deprecationNote = "Never read by the component: the resource permission operations take a PolicyRepresentation as" + + " the POJO request body") + @Deprecated public static final String PERMISSION_NAME = "CamelKeycloakPermissionName"; - @Metadata(description = "The scope name", javaType = "String") + @Metadata(description = "The scope name", javaType = "String", + deprecationNote = "Never read by the component: the scope operations take their representation as the POJO" + + " request body") + @Deprecated public static final String SCOPE_NAME = "CamelKeycloakScopeName"; // User Attribute constants @@ -141,7 +168,10 @@ public final class KeycloakConstants { @Metadata(description = "The credential ID", javaType = "String") public static final String CREDENTIAL_ID = "CamelKeycloakCredentialId"; - @Metadata(description = "The credential type", javaType = "String") + @Metadata(description = "The credential type", javaType = "String", + deprecationNote = "Never read by the component: the credential operations take a CredentialRepresentation as the" + + " POJO request body") + @Deprecated public static final String CREDENTIAL_TYPE = "CamelKeycloakCredentialType"; // User Action constants @@ -174,7 +204,10 @@ public final class KeycloakConstants { @Metadata(description = "Continue on error during bulk operations", javaType = "Boolean") public static final String CONTINUE_ON_ERROR = "CamelKeycloakContinueOnError"; - @Metadata(description = "Batch size for bulk operations", javaType = "Integer") + @Metadata(description = "Batch size for bulk operations", javaType = "Integer", + deprecationNote = "Never read by the component: the bulk operations send every element of the list one by one," + + " with no batching") + @Deprecated public static final String BATCH_SIZE = "CamelKeycloakBatchSize"; // Permission evaluation constants From 4124e1af838615b501ff802de449987c94dfd63c Mon Sep 17 00:00:00 2001 From: Guillaume Nodet Date: Sat, 14 Nov 2026 19:01:48 +0000 Subject: [PATCH 2/3] Regen --- .../dsl/KeycloakEndpointBuilderFactory.java | 53 +++++++++++++++---- 1 file changed, 42 insertions(+), 11 deletions(-) diff --git a/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/KeycloakEndpointBuilderFactory.java b/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/KeycloakEndpointBuilderFactory.java index 861f2e9862252..db8c7aa003525 100644 --- a/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/KeycloakEndpointBuilderFactory.java +++ b/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/KeycloakEndpointBuilderFactory.java @@ -2658,7 +2658,8 @@ public String keycloakUserLastName() { return "CamelKeycloakUserLastName"; } /** - * The role ID. + * The role ID. Deprecation note: Never read by the component: the role + * operations address a role by its name (CamelKeycloakRoleName). * * The option is a: {@code String} type. * @@ -2666,6 +2667,7 @@ public String keycloakUserLastName() { * * @return the name of the header {@code KeycloakRoleId}. */ + @Deprecated public String keycloakRoleId() { return "CamelKeycloakRoleId"; } @@ -2862,7 +2864,9 @@ public String keycloakIdpAlias() { return "CamelKeycloakIdpAlias"; } /** - * The identity provider ID. + * The identity provider ID. Deprecation note: Never read by the + * component: the identity provider operations address a provider by its + * alias (CamelKeycloakIdpAlias). * * The option is a: {@code String} type. * @@ -2870,6 +2874,7 @@ public String keycloakIdpAlias() { * * @return the name of the header {@code KeycloakIdpId}. */ + @Deprecated public String keycloakIdpId() { return "CamelKeycloakIdpId"; } @@ -2886,7 +2891,9 @@ public String keycloakResourceId() { return "CamelKeycloakResourceId"; } /** - * The resource name. + * The resource name. Deprecation note: Never read by the component: + * createResource and updateResource take a ResourceRepresentation as + * the POJO request body. * * The option is a: {@code String} type. * @@ -2894,11 +2901,14 @@ public String keycloakResourceId() { * * @return the name of the header {@code KeycloakResourceName}. */ + @Deprecated public String keycloakResourceName() { return "CamelKeycloakResourceName"; } /** - * The resource type. + * The resource type. Deprecation note: Never read by the component: + * createResource and updateResource take a ResourceRepresentation as + * the POJO request body. * * The option is a: {@code String} type. * @@ -2906,11 +2916,14 @@ public String keycloakResourceName() { * * @return the name of the header {@code KeycloakResourceType}. */ + @Deprecated public String keycloakResourceType() { return "CamelKeycloakResourceType"; } /** - * The resource URI. + * The resource URI. Deprecation note: Never read by the component: + * createResource and updateResource take a ResourceRepresentation as + * the POJO request body. * * The option is a: {@code String} type. * @@ -2918,6 +2931,7 @@ public String keycloakResourceType() { * * @return the name of the header {@code KeycloakResourceUri}. */ + @Deprecated public String keycloakResourceUri() { return "CamelKeycloakResourceUri"; } @@ -2934,7 +2948,9 @@ public String keycloakPolicyId() { return "CamelKeycloakPolicyId"; } /** - * The policy name. + * The policy name. Deprecation note: Never read by the component: the + * resource policy operations take a PolicyRepresentation as the POJO + * request body. * * The option is a: {@code String} type. * @@ -2942,11 +2958,14 @@ public String keycloakPolicyId() { * * @return the name of the header {@code KeycloakPolicyName}. */ + @Deprecated public String keycloakPolicyName() { return "CamelKeycloakPolicyName"; } /** - * The policy type. + * The policy type. Deprecation note: Never read by the component: the + * resource policy operations take a PolicyRepresentation as the POJO + * request body. * * The option is a: {@code String} type. * @@ -2954,6 +2973,7 @@ public String keycloakPolicyName() { * * @return the name of the header {@code KeycloakPolicyType}. */ + @Deprecated public String keycloakPolicyType() { return "CamelKeycloakPolicyType"; } @@ -2970,7 +2990,9 @@ public String keycloakPermissionId() { return "CamelKeycloakPermissionId"; } /** - * The permission name. + * The permission name. Deprecation note: Never read by the component: + * the resource permission operations take a PolicyRepresentation as the + * POJO request body. * * The option is a: {@code String} type. * @@ -2978,11 +3000,13 @@ public String keycloakPermissionId() { * * @return the name of the header {@code KeycloakPermissionName}. */ + @Deprecated public String keycloakPermissionName() { return "CamelKeycloakPermissionName"; } /** - * The scope name. + * The scope name. Deprecation note: Never read by the component: the + * scope operations take their representation as the POJO request body. * * The option is a: {@code String} type. * @@ -2990,6 +3014,7 @@ public String keycloakPermissionName() { * * @return the name of the header {@code KeycloakScopeName}. */ + @Deprecated public String keycloakScopeName() { return "CamelKeycloakScopeName"; } @@ -3030,7 +3055,9 @@ public String keycloakCredentialId() { return "CamelKeycloakCredentialId"; } /** - * The credential type. + * The credential type. Deprecation note: Never read by the component: + * the credential operations take a CredentialRepresentation as the POJO + * request body. * * The option is a: {@code String} type. * @@ -3038,6 +3065,7 @@ public String keycloakCredentialId() { * * @return the name of the header {@code KeycloakCredentialType}. */ + @Deprecated public String keycloakCredentialType() { return "CamelKeycloakCredentialType"; } @@ -3152,7 +3180,9 @@ public String keycloakContinueOnError() { return "CamelKeycloakContinueOnError"; } /** - * Batch size for bulk operations. + * Batch size for bulk operations. Deprecation note: Never read by the + * component: the bulk operations send every element of the list one by + * one, with no batching. * * The option is a: {@code Integer} type. * @@ -3160,6 +3190,7 @@ public String keycloakContinueOnError() { * * @return the name of the header {@code KeycloakBatchSize}. */ + @Deprecated public String keycloakBatchSize() { return "CamelKeycloakBatchSize"; } From 3d8a4c8d447dd93900f8bd47efa5340c6a53e621 Mon Sep 17 00:00:00 2001 From: dhairya05 Date: Sun, 15 Nov 2026 15:19:05 +0530 Subject: [PATCH 3/3] camel-keycloak: correct three deprecation notes, add the upgrade-guide entry The three notes named the wrong reason: - PERMISSION_NAME: createResourcePermission takes a ResourcePermissionRepresentation, not a PolicyRepresentation; only updatePermission and getPermissionById use that one, and they are keyed on PERMISSION_ID. - SCOPE_NAME: there are no authorization-scope operations at all. The client scope operations read CLIENT_SCOPE_NAME. - CREDENTIAL_TYPE: no credential operation takes a CredentialRepresentation body. getUserCredentials returns them, deleteUserCredential uses CREDENTIAL_ID, and resetUserPassword builds the representation itself from USER_PASSWORD. Added a section to the 4.24 upgrade guide listing all eleven headers with where each value belongs instead. Co-Authored-By: Claude Opus 5 --- .../camel/catalog/components/keycloak.json | 6 +-- .../camel/component/keycloak/keycloak.json | 6 +-- .../component/keycloak/KeycloakConstants.java | 14 ++++--- .../pages/camel-4x-upgrade-guide-4_24.adoc | 38 +++++++++++++++++++ .../dsl/KeycloakEndpointBuilderFactory.java | 16 +++++--- 5 files changed, 62 insertions(+), 18 deletions(-) diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/keycloak.json b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/keycloak.json index 9d27f1197231c..d3707e6cd6bdd 100644 --- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/keycloak.json +++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/keycloak.json @@ -93,12 +93,12 @@ "CamelKeycloakPolicyName": { "index": 30, "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "String", "deprecated": true, "deprecationNote": "Never read by the component: the resource policy operations take a PolicyRepresentation as the POJO request body", "autowired": false, "secret": false, "description": "The policy name. Deprecation note: Never read by the component: the resource policy operations take a PolicyRepresentation as the POJO request body", "constantName": "org.apache.camel.component.keycloak.KeycloakConstants#POLICY_NAME" }, "CamelKeycloakPolicyType": { "index": 31, "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "String", "deprecated": true, "deprecationNote": "Never read by the component: the resource policy operations take a PolicyRepresentation as the POJO request body", "autowired": false, "secret": false, "description": "The policy type. Deprecation note: Never read by the component: the resource policy operations take a PolicyRepresentation as the POJO request body", "constantName": "org.apache.camel.component.keycloak.KeycloakConstants#POLICY_TYPE" }, "CamelKeycloakPermissionId": { "index": 32, "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "String", "deprecated": false, "autowired": false, "secret": false, "description": "The permission ID", "constantName": "org.apache.camel.component.keycloak.KeycloakConstants#PERMISSION_ID" }, - "CamelKeycloakPermissionName": { "index": 33, "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "String", "deprecated": true, "deprecationNote": "Never read by the component: the resource permission operations take a PolicyRepresentation as the POJO request body", "autowired": false, "secret": false, "description": "The permission name. Deprecation note: Never read by the component: the resource permission operations take a PolicyRepresentation as the POJO request body", "constantName": "org.apache.camel.component.keycloak.KeycloakConstants#PERMISSION_NAME" }, - "CamelKeycloakScopeName": { "index": 34, "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "String", "deprecated": true, "deprecationNote": "Never read by the component: the scope operations take their representation as the POJO request body", "autowired": false, "secret": false, "description": "The scope name. Deprecation note: Never read by the component: the scope operations take their representation as the POJO request body", "constantName": "org.apache.camel.component.keycloak.KeycloakConstants#SCOPE_NAME" }, + "CamelKeycloakPermissionName": { "index": 33, "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "String", "deprecated": true, "deprecationNote": "Never read by the component: createResourcePermission takes a ResourcePermissionRepresentation as the POJO request body, and the other permission operations identify the permission with CamelKeycloakPermissionId", "autowired": false, "secret": false, "description": "The permission name. Deprecation note: Never read by the component: createResourcePermission takes a ResourcePermissionRepresentation as the POJO request body, and the other permission operations identify the permission with CamelKeycloakPermissionId", "constantName": "org.apache.camel.component.keycloak.KeycloakConstants#PERMISSION_NAME" }, + "CamelKeycloakScopeName": { "index": 34, "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "String", "deprecated": true, "deprecationNote": "Never read by the component: there are no authorization-scope operations, and the client scope operations use CamelKeycloakClientScopeName", "autowired": false, "secret": false, "description": "The scope name. Deprecation note: Never read by the component: there are no authorization-scope operations, and the client scope operations use CamelKeycloakClientScopeName", "constantName": "org.apache.camel.component.keycloak.KeycloakConstants#SCOPE_NAME" }, "CamelKeycloakAttributeName": { "index": 35, "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "String", "deprecated": false, "autowired": false, "secret": false, "description": "The user attribute name", "constantName": "org.apache.camel.component.keycloak.KeycloakConstants#ATTRIBUTE_NAME" }, "CamelKeycloakAttributeValue": { "index": 36, "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "String", "deprecated": false, "autowired": false, "secret": false, "description": "The user attribute value", "constantName": "org.apache.camel.component.keycloak.KeycloakConstants#ATTRIBUTE_VALUE" }, "CamelKeycloakCredentialId": { "index": 37, "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "String", "deprecated": false, "autowired": false, "secret": false, "description": "The credential ID", "constantName": "org.apache.camel.component.keycloak.KeycloakConstants#CREDENTIAL_ID" }, - "CamelKeycloakCredentialType": { "index": 38, "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "String", "deprecated": true, "deprecationNote": "Never read by the component: the credential operations take a CredentialRepresentation as the POJO request body", "autowired": false, "secret": false, "description": "The credential type. Deprecation note: Never read by the component: the credential operations take a CredentialRepresentation as the POJO request body", "constantName": "org.apache.camel.component.keycloak.KeycloakConstants#CREDENTIAL_TYPE" }, + "CamelKeycloakCredentialType": { "index": 38, "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "String", "deprecated": true, "deprecationNote": "Never read by the component: no credential operation takes a CredentialRepresentation request body. deleteUserCredential uses CamelKeycloakCredentialId, and resetUserPassword builds a password credential from CamelKeycloakUserPassword", "autowired": false, "secret": false, "description": "The credential type. Deprecation note: Never read by the component: no credential operation takes a CredentialRepresentation request body. deleteUserCredential uses CamelKeycloakCredentialId, and resetUserPassword builds a password credential from CamelKeycloakUserPassword", "constantName": "org.apache.camel.component.keycloak.KeycloakConstants#CREDENTIAL_TYPE" }, "CamelKeycloakRequiredAction": { "index": 39, "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "String", "deprecated": false, "autowired": false, "secret": false, "description": "The required action type", "constantName": "org.apache.camel.component.keycloak.KeycloakConstants#REQUIRED_ACTION" }, "CamelKeycloakActions": { "index": 40, "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "java.util.List", "deprecated": false, "autowired": false, "secret": false, "description": "The list of actions to execute", "constantName": "org.apache.camel.component.keycloak.KeycloakConstants#ACTIONS" }, "CamelKeycloakRedirectUri": { "index": 41, "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "String", "deprecated": false, "autowired": false, "secret": false, "description": "The redirect URI", "constantName": "org.apache.camel.component.keycloak.KeycloakConstants#REDIRECT_URI" }, diff --git a/components/camel-keycloak/src/generated/resources/META-INF/org/apache/camel/component/keycloak/keycloak.json b/components/camel-keycloak/src/generated/resources/META-INF/org/apache/camel/component/keycloak/keycloak.json index 9d27f1197231c..d3707e6cd6bdd 100644 --- a/components/camel-keycloak/src/generated/resources/META-INF/org/apache/camel/component/keycloak/keycloak.json +++ b/components/camel-keycloak/src/generated/resources/META-INF/org/apache/camel/component/keycloak/keycloak.json @@ -93,12 +93,12 @@ "CamelKeycloakPolicyName": { "index": 30, "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "String", "deprecated": true, "deprecationNote": "Never read by the component: the resource policy operations take a PolicyRepresentation as the POJO request body", "autowired": false, "secret": false, "description": "The policy name. Deprecation note: Never read by the component: the resource policy operations take a PolicyRepresentation as the POJO request body", "constantName": "org.apache.camel.component.keycloak.KeycloakConstants#POLICY_NAME" }, "CamelKeycloakPolicyType": { "index": 31, "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "String", "deprecated": true, "deprecationNote": "Never read by the component: the resource policy operations take a PolicyRepresentation as the POJO request body", "autowired": false, "secret": false, "description": "The policy type. Deprecation note: Never read by the component: the resource policy operations take a PolicyRepresentation as the POJO request body", "constantName": "org.apache.camel.component.keycloak.KeycloakConstants#POLICY_TYPE" }, "CamelKeycloakPermissionId": { "index": 32, "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "String", "deprecated": false, "autowired": false, "secret": false, "description": "The permission ID", "constantName": "org.apache.camel.component.keycloak.KeycloakConstants#PERMISSION_ID" }, - "CamelKeycloakPermissionName": { "index": 33, "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "String", "deprecated": true, "deprecationNote": "Never read by the component: the resource permission operations take a PolicyRepresentation as the POJO request body", "autowired": false, "secret": false, "description": "The permission name. Deprecation note: Never read by the component: the resource permission operations take a PolicyRepresentation as the POJO request body", "constantName": "org.apache.camel.component.keycloak.KeycloakConstants#PERMISSION_NAME" }, - "CamelKeycloakScopeName": { "index": 34, "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "String", "deprecated": true, "deprecationNote": "Never read by the component: the scope operations take their representation as the POJO request body", "autowired": false, "secret": false, "description": "The scope name. Deprecation note: Never read by the component: the scope operations take their representation as the POJO request body", "constantName": "org.apache.camel.component.keycloak.KeycloakConstants#SCOPE_NAME" }, + "CamelKeycloakPermissionName": { "index": 33, "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "String", "deprecated": true, "deprecationNote": "Never read by the component: createResourcePermission takes a ResourcePermissionRepresentation as the POJO request body, and the other permission operations identify the permission with CamelKeycloakPermissionId", "autowired": false, "secret": false, "description": "The permission name. Deprecation note: Never read by the component: createResourcePermission takes a ResourcePermissionRepresentation as the POJO request body, and the other permission operations identify the permission with CamelKeycloakPermissionId", "constantName": "org.apache.camel.component.keycloak.KeycloakConstants#PERMISSION_NAME" }, + "CamelKeycloakScopeName": { "index": 34, "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "String", "deprecated": true, "deprecationNote": "Never read by the component: there are no authorization-scope operations, and the client scope operations use CamelKeycloakClientScopeName", "autowired": false, "secret": false, "description": "The scope name. Deprecation note: Never read by the component: there are no authorization-scope operations, and the client scope operations use CamelKeycloakClientScopeName", "constantName": "org.apache.camel.component.keycloak.KeycloakConstants#SCOPE_NAME" }, "CamelKeycloakAttributeName": { "index": 35, "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "String", "deprecated": false, "autowired": false, "secret": false, "description": "The user attribute name", "constantName": "org.apache.camel.component.keycloak.KeycloakConstants#ATTRIBUTE_NAME" }, "CamelKeycloakAttributeValue": { "index": 36, "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "String", "deprecated": false, "autowired": false, "secret": false, "description": "The user attribute value", "constantName": "org.apache.camel.component.keycloak.KeycloakConstants#ATTRIBUTE_VALUE" }, "CamelKeycloakCredentialId": { "index": 37, "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "String", "deprecated": false, "autowired": false, "secret": false, "description": "The credential ID", "constantName": "org.apache.camel.component.keycloak.KeycloakConstants#CREDENTIAL_ID" }, - "CamelKeycloakCredentialType": { "index": 38, "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "String", "deprecated": true, "deprecationNote": "Never read by the component: the credential operations take a CredentialRepresentation as the POJO request body", "autowired": false, "secret": false, "description": "The credential type. Deprecation note: Never read by the component: the credential operations take a CredentialRepresentation as the POJO request body", "constantName": "org.apache.camel.component.keycloak.KeycloakConstants#CREDENTIAL_TYPE" }, + "CamelKeycloakCredentialType": { "index": 38, "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "String", "deprecated": true, "deprecationNote": "Never read by the component: no credential operation takes a CredentialRepresentation request body. deleteUserCredential uses CamelKeycloakCredentialId, and resetUserPassword builds a password credential from CamelKeycloakUserPassword", "autowired": false, "secret": false, "description": "The credential type. Deprecation note: Never read by the component: no credential operation takes a CredentialRepresentation request body. deleteUserCredential uses CamelKeycloakCredentialId, and resetUserPassword builds a password credential from CamelKeycloakUserPassword", "constantName": "org.apache.camel.component.keycloak.KeycloakConstants#CREDENTIAL_TYPE" }, "CamelKeycloakRequiredAction": { "index": 39, "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "String", "deprecated": false, "autowired": false, "secret": false, "description": "The required action type", "constantName": "org.apache.camel.component.keycloak.KeycloakConstants#REQUIRED_ACTION" }, "CamelKeycloakActions": { "index": 40, "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "java.util.List", "deprecated": false, "autowired": false, "secret": false, "description": "The list of actions to execute", "constantName": "org.apache.camel.component.keycloak.KeycloakConstants#ACTIONS" }, "CamelKeycloakRedirectUri": { "index": 41, "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "String", "deprecated": false, "autowired": false, "secret": false, "description": "The redirect URI", "constantName": "org.apache.camel.component.keycloak.KeycloakConstants#REDIRECT_URI" }, diff --git a/components/camel-keycloak/src/main/java/org/apache/camel/component/keycloak/KeycloakConstants.java b/components/camel-keycloak/src/main/java/org/apache/camel/component/keycloak/KeycloakConstants.java index d675a85b2dd2a..80b5e6d4994ed 100644 --- a/components/camel-keycloak/src/main/java/org/apache/camel/component/keycloak/KeycloakConstants.java +++ b/components/camel-keycloak/src/main/java/org/apache/camel/component/keycloak/KeycloakConstants.java @@ -146,14 +146,15 @@ public final class KeycloakConstants { public static final String PERMISSION_ID = "CamelKeycloakPermissionId"; @Metadata(description = "The permission name", javaType = "String", - deprecationNote = "Never read by the component: the resource permission operations take a PolicyRepresentation as" - + " the POJO request body") + deprecationNote = "Never read by the component: createResourcePermission takes a" + + " ResourcePermissionRepresentation as the POJO request body, and the other permission" + + " operations identify the permission with CamelKeycloakPermissionId") @Deprecated public static final String PERMISSION_NAME = "CamelKeycloakPermissionName"; @Metadata(description = "The scope name", javaType = "String", - deprecationNote = "Never read by the component: the scope operations take their representation as the POJO" - + " request body") + deprecationNote = "Never read by the component: there are no authorization-scope operations, and the client" + + " scope operations use CamelKeycloakClientScopeName") @Deprecated public static final String SCOPE_NAME = "CamelKeycloakScopeName"; @@ -169,8 +170,9 @@ public final class KeycloakConstants { public static final String CREDENTIAL_ID = "CamelKeycloakCredentialId"; @Metadata(description = "The credential type", javaType = "String", - deprecationNote = "Never read by the component: the credential operations take a CredentialRepresentation as the" - + " POJO request body") + deprecationNote = "Never read by the component: no credential operation takes a CredentialRepresentation request" + + " body. deleteUserCredential uses CamelKeycloakCredentialId, and resetUserPassword builds a" + + " password credential from CamelKeycloakUserPassword") @Deprecated public static final String CREDENTIAL_TYPE = "CamelKeycloakCredentialType"; diff --git a/docs/user-manual/modules/ROOT/pages/camel-4x-upgrade-guide-4_24.adoc b/docs/user-manual/modules/ROOT/pages/camel-4x-upgrade-guide-4_24.adoc index 028422a474ff9..139d844eb1310 100644 --- a/docs/user-manual/modules/ROOT/pages/camel-4x-upgrade-guide-4_24.adoc +++ b/docs/user-manual/modules/ROOT/pages/camel-4x-upgrade-guide-4_24.adoc @@ -8743,3 +8743,41 @@ if it configured the proxy. It is now deprecated, with a `deprecationNote` that says so, and its description no longer claims to configure a proxy. Remove `protocol` from the endpoint URI or the configuration. To send the client's traffic through a proxy, use `proxyProtocol` together with `proxyHost` and `proxyPort`, which the shared client builder does apply. + +=== camel-keycloak - 11 documented headers are deprecated + +Eleven of the headers the component documents are never read by it. A route that sets one gets no error and no effect, +because the producer takes the value from somewhere else: + +[cols="1,1"] +|=== +| Header | Where the value comes from instead + +| `CamelKeycloakRoleId` +| the role operations address a role by its name, `CamelKeycloakRoleName` + +| `CamelKeycloakIdpId` +| the identity provider operations address a provider by its alias, `CamelKeycloakIdpAlias` + +| `CamelKeycloakResourceName`, `CamelKeycloakResourceType`, `CamelKeycloakResourceUri` +| `createResource` and `updateResource` take a `ResourceRepresentation` as the POJO request body + +| `CamelKeycloakPolicyName`, `CamelKeycloakPolicyType` +| the policy operations take a `PolicyRepresentation` as the POJO request body + +| `CamelKeycloakPermissionName` +| `createResourcePermission` takes a `ResourcePermissionRepresentation`, and the other permission operations identify +the permission with `CamelKeycloakPermissionId` + +| `CamelKeycloakScopeName` +| there are no authorization-scope operations; the client scope operations use `CamelKeycloakClientScopeName` + +| `CamelKeycloakCredentialType` +| no credential operation takes a `CredentialRepresentation` request body: `deleteUserCredential` uses +`CamelKeycloakCredentialId`, and `resetUserPassword` builds a password credential from `CamelKeycloakUserPassword` + +| `CamelKeycloakBatchSize` +| the bulk operations send every element of the list one by one, with no batching +|=== + +Each is now deprecated, with a `deprecationNote` carrying the same information. diff --git a/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/KeycloakEndpointBuilderFactory.java b/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/KeycloakEndpointBuilderFactory.java index db8c7aa003525..9d86075611ea5 100644 --- a/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/KeycloakEndpointBuilderFactory.java +++ b/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/KeycloakEndpointBuilderFactory.java @@ -2991,8 +2991,9 @@ public String keycloakPermissionId() { } /** * The permission name. Deprecation note: Never read by the component: - * the resource permission operations take a PolicyRepresentation as the - * POJO request body. + * createResourcePermission takes a ResourcePermissionRepresentation as + * the POJO request body, and the other permission operations identify + * the permission with CamelKeycloakPermissionId. * * The option is a: {@code String} type. * @@ -3005,8 +3006,9 @@ public String keycloakPermissionName() { return "CamelKeycloakPermissionName"; } /** - * The scope name. Deprecation note: Never read by the component: the - * scope operations take their representation as the POJO request body. + * The scope name. Deprecation note: Never read by the component: there + * are no authorization-scope operations, and the client scope + * operations use CamelKeycloakClientScopeName. * * The option is a: {@code String} type. * @@ -3056,8 +3058,10 @@ public String keycloakCredentialId() { } /** * The credential type. Deprecation note: Never read by the component: - * the credential operations take a CredentialRepresentation as the POJO - * request body. + * no credential operation takes a CredentialRepresentation request + * body. deleteUserCredential uses CamelKeycloakCredentialId, and + * resetUserPassword builds a password credential from + * CamelKeycloakUserPassword. * * The option is a: {@code String} type. *