release version 1.10.0

This commit is contained in:
2024-10-07 18:42:55 +03:00
parent 2034182607
commit a5088587f7
1501 changed files with 28818 additions and 59966 deletions

View File

@ -3,7 +3,7 @@
<parent>
<groupId>ru.entaxy.esb.platform.runtime.core</groupId>
<artifactId>objects-implementations</artifactId>
<version>1.9.0</version>
<version>1.10.0</version>
</parent>
<groupId>ru.entaxy.esb.platform.runtime.core.objects-implementations</groupId>
<artifactId>service-implementation</artifactId>

View File

@ -1,55 +1,74 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>ru.entaxy.esb.platform.runtime.core.objects-implementations</groupId>
<artifactId>service-implementation</artifactId>
<version>1.9.0</version>
</parent>
<groupId>ru.entaxy.esb.platform.runtime.core.objects-implementations.service-implementation</groupId>
<artifactId>service-producing</artifactId>
<packaging>bundle</packaging>
<name>ENTAXY :: PLATFORM :: CORE :: OBJECTS IMPLEMENTATIONS :: SERVICE :: PRODUCING</name>
<description>ENTAXY :: PLATFORM :: CORE :: OBJECTS IMPLEMENTATIONS :: SERVICE :: PRODUCING</description>
<dependencies>
<dependency>
<groupId>
ru.entaxy.esb.platform.runtime.core.object-producing
</groupId>
<artifactId>object-producer-api</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>
ru.entaxy.esb.platform.runtime.core.object-producing
</groupId>
<artifactId>object-producer-core</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>
ru.entaxy.esb.platform.runtime.base.objects-base
</groupId>
<artifactId>object-factory</artifactId>
<version>${project.version}</version>
</dependency>
</dependencies>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>ru.entaxy.esb.platform.runtime.core.objects-implementations</groupId>
<artifactId>service-implementation</artifactId>
<version>1.10.0</version>
</parent>
<groupId>ru.entaxy.esb.platform.runtime.core.objects-implementations.service-implementation</groupId>
<artifactId>service-producing</artifactId>
<packaging>bundle</packaging>
<name>ENTAXY :: PLATFORM :: CORE :: OBJECTS IMPLEMENTATIONS :: SERVICE :: PRODUCING</name>
<description>ENTAXY :: PLATFORM :: CORE :: OBJECTS IMPLEMENTATIONS :: SERVICE :: PRODUCING</description>
<properties>
<bundle.osgi.export.pkg>
ru.entaxy.platform.core.objects.service.producing
</bundle.osgi.export.pkg>
</properties>
<dependencies>
<dependency>
<groupId>
ru.entaxy.esb.platform.runtime.core.object-producing
</groupId>
<artifactId>object-producer-api</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>
ru.entaxy.esb.platform.runtime.core.object-producing
</groupId>
<artifactId>object-producer-core</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>
ru.entaxy.esb.platform.runtime.base.objects-base
</groupId>
<artifactId>object-factory</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-validator</artifactId>
<version>5.0.2.Final</version>
</dependency>
<dependency>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-rt-rs-security-oauth2</artifactId>
<version>${cxf.version}</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<extensions>true</extensions>
<configuration>
<instructions>
<Entaxy-Factory-Provider>true</Entaxy-Factory-Provider>
<Entaxy-Template-Provider>true</Entaxy-Template-Provider>
<Entaxy-Resource-Provider>true</Entaxy-Resource-Provider>
</instructions>
</configuration>
</plugin>
</plugins>
</build>
<build>
<plugins>
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<extensions>true</extensions>
<configuration>
<instructions>
<Entaxy-Factory-Provider>true</Entaxy-Factory-Provider>
<Entaxy-Template-Provider>true</Entaxy-Template-Provider>
<Entaxy-Resource-Provider>true</Entaxy-Resource-Provider>
</instructions>
</configuration>
</plugin>
</plugins>
</build>
</project>

View File

@ -2,7 +2,7 @@
* ~~~~~~licensing~~~~~~
* connector-producing
* ==========
* Copyright (C) 2020 - 2023 EmDev LLC
* Copyright (C) 2020 - 2024 EmDev LLC
* ==========
* You may not use this file except in accordance with the License Terms of the Copyright
* Holder located at: https://entaxy.ru/eula . All copyrights, all intellectual property

View File

@ -4,14 +4,42 @@
"type": "entaxy.runtime.service",
"description": "",
"isAbstract": true,
"parent": "base-object",
"parent": "abstract-route-container-object",
"label": "",
"category": ""
},
"entaxy.runtime.service": {
"serviceType": "REST"
"serviceType": "REST",
"serviceScope": "public"
},
"fields": {
"objectId": {
"@UI": {
"transmitAlways": true
}
},
"generateLoggingKey": {
"displayName": "Generate logging key",
"description": "Enable to automatically create a logging key that will be used to track the request processing. (${exchangeProperty.requestId}, ${exchangeProperty.service}, ${exchangeProperty.operation}, ${exchangeProperty.objectId}, ${exchangeProperty.parameter}, ${exchangeProperty.sender}, ${exchangeProperty.receiver})",
"type": "Boolean",
"required": false,
"group": "main",
"defaultValue": true,
"@UI": {
"transmitAlways": true
}
},
"removeAllHeadersBeforeAnswering": {
"displayName": "Remove all headers before answering",
"description": "Enable to removing all headers before answering.",
"type": "Boolean",
"required": false,
"group": "main",
"defaultValue": true,
"@UI": {
"transmitAlways": true
}
}
},
"outputs": {}
}
}

View File

@ -7,15 +7,27 @@
"isAbstract": true
},
"entaxy.runtime.connector": {
"exclusiveMode": "NON_EXCLUSIVE_ONLY"
"exclusiveMode": "NON_EXCLUSIVE_ONLY",
"type": "service-rest",
"protocol": "service-rest",
"serviceType": "REST"
},
"fields": {},
"outputs": {
"init": {
"isDefault": true,
"fields": {
"removeAllHeadersBeforeAnswering": {
"isHidden": true
},
"generateLoggingKey": {
"isHidden": true,
"defaultValue": false
}
},
"config": {
"configurable": true
}
}
}
}
}

View File

@ -15,11 +15,35 @@
"objectId": {
"displayName": "Service Id"
},
"isValidate": {
"required": false,
"defaultValue" : false,
"description": "Enables schema validation for the request body. Throws an exception if the request body does not comply with the specified API schema. For more details see <a target=\"_blank\" href=\"https://docs.entaxy.ru/entaxy-core/${project.version}/core/schema/Rest_services.html\">Entaxy docs</a>",
"group": "main",
"displayName": "Schema Validation Enabled",
"type": "Boolean"
},
"resultType": {
"required": false,
"defaultValue" : "POJO",
"description": "Processing data format: <br/> POJO: Use to work with data in the form of Java objects; <br/> ORIGIN: Use to work with data in its original form. <br/> For more details see <a target=\"_blank\" href=\"https://docs.entaxy.ru/entaxy-core/${project.version}/core/schema/Rest_services.html\">Entaxy docs</a>",
"displayName": "Data Format",
"group": "main",
"type": "String",
"@TYPEINFO": {
"type": "enum",
"values": [
"POJO",
"ORIGIN"
]
}
},
"address": {
"displayName": "Address",
"type": "String",
"required": true,
"group": "main",
"description": "The service publication address. Specifies the address at which the service will be available for interaction with other system components. If the field is left blank, it will be generated automatically based on the Service Id. For more details see <a target=\"_blank\" href=\"https://docs.entaxy.ru/entaxy-core/${project.version}/core/schema/Rest_services.html\">Entaxy docs</a>",
"defaultValue": {
"@CALCULATED": {
"lazy": false,
@ -79,8 +103,10 @@
"isDefault": true,
"fields": {
"address": {},
"isValidate": {},
"resultType": {},
"##publish": {}
}
}
}
}
}

View File

@ -1,16 +1,18 @@
{
"factory": {
"id": "openapi-based-rest-service-protected",
"displayName": "SERVICE :: REST :: OPENAPI :: PROTECTED",
"displayName": "REST :: OPENAPI :: PROTECTED",
"type": "entaxy.runtime.service",
"description": "",
"description": "Protected openapi-based REST service. For more details see <a target=\"_blank\" href=\"https://docs.entaxy.ru/entaxy-core/${project.version}/core/schema/Rest_services.html\">Entaxy docs</a>",
"isAbstract": false,
"_parent": "openapi-based-rest-service",
"parent": "openapi-based-rest-service-public",
"label": "service,rest,openapi",
"category": ""
},
"entaxy.runtime.service": {},
"entaxy.runtime.service": {
"serviceScope": "protected"
},
"fields": {
"operationRouter": {
"defaultValue": {
@ -26,124 +28,151 @@
"location": "${serviceResourcesRoot}/operationRouterProtected.xml"
}
},
"enableAuthorization": {
"connectorInFactory": {
"type": "factory",
"required": true,
"isHidden": true,
"defaultValue": true
},
"connectorInFactory": {
"type": "factory",
"required": true,
"isHidden": true,
"_isRef": true,
"_isRefByValueOnly": true,
"@RESOURCE": {
"endType": "String",
"provider": "service-resources",
"location": {
"@CALCULATED": {
"expression": "${#OWNER#.properties._serviceMetadata.serviceResourcesRoot}/${#OWNER#.objectId}/${#OWNER#.objectId}-connector-in.factory",
"lazy": false
}
},
"service": {
"@CALCULATED": {
"expression": "${#OWNER#.properties._serviceMetadata}",
"resultType": "map",
"blacklistContent": ["@RESOURCE_META"],
"lazy": false
}
}
},
"defaultValue": {
"type": "entaxy.runtime.service",
"factoryId": "#OWNER#",
"outputType": "connectorInFactory",
"scope": "public",
"properties": {
"service": {
"@CALCULATED": {
"expression": "${#OWNER_OF_TYPE:entaxy.runtime.service#.properties._serviceMetadata}",
"resultType": "map",
"blacklistContent": ["@RESOURCE_META"],
"lazy": false
}
},
"serviceId": {
"@CALCULATED": {
"expression": "${#OWNER_OF_TYPE:entaxy.runtime.service#.objectId}",
"resultType": "String",
"lazy": false
}
},
"location": {
"@CALCULATED": {
"lazy": false,
"expression": "${#OWNER_OF_TYPE:entaxy.runtime.service#.properties._serviceMetadata.serviceResourcesRoot}/operationRouterConnector.xml"
}
}
},
"refConfig": {
"isRefByValueOnly": true
}
}
},
"##headers": {
"type": "List",
"required": true,
"isHidden": true,
"defaultValue": [
{
"name": "Entaxy-Dynamic-Factory-Provider",
"type": "boolean",
"value": true
},
{
"name": "Entaxy-Dynamic-Factory-Url",
"type": "List",
"value": [
{"@CALCULATED": {
"expression": "entaxy-resource://service-resources/${properties._serviceMetadata.serviceResourcesRoot}/${objectId}/${objectId}-connector-in.factory",
"lazy": false,
"resultType": "String"
}}
]
}
]
}
"@INTERNAL": true,
"_isRef": true,
"_isRefByValueOnly": true,
"@RESOURCE": {
"endType": "String",
"provider": "service-resources",
"location": {
"@CALCULATED": {
"expression": "${#OWNER#.properties._serviceMetadata.serviceResourcesRoot}/${#OWNER#.objectId}/${#OWNER#.objectId}-connector-in.factory",
"lazy": false
}
},
"service": {
"@CALCULATED": {
"expression": "${#OWNER#.properties._serviceMetadata}",
"resultType": "map",
"blacklistContent": [
"@RESOURCE_META"
],
"lazy": false
}
}
},
"defaultValue": {
"type": "entaxy.runtime.service",
"factoryId": "#OWNER#",
"outputType": "connectorInFactory",
"scope": "public",
"properties": {
"service": {
"@CALCULATED": {
"expression": "${#OWNER_OF_TYPE:entaxy.runtime.service#.properties._serviceMetadata}",
"resultType": "map",
"blacklistContent": [
"@RESOURCE_META"
],
"lazy": false
}
},
"serviceId": {
"@CALCULATED": {
"expression": "${#OWNER_OF_TYPE:entaxy.runtime.service#.objectId}",
"resultType": "String",
"lazy": false
}
},
"serviceObjectType": "entaxy.runtime.service",
"serviceType": {
"@CALCULATED": {
"expression": "${#OWNER_OF_TYPE:entaxy.runtime.service#.#FACTORY#.#TYPEINFO#.serviceType}",
"resultType": "String",
"lazy": false
}
},
"location": {
"@CALCULATED": {
"lazy": false,
"expression": "${#OWNER_OF_TYPE:entaxy.runtime.service#.properties._serviceMetadata.serviceResourcesRoot}/operationRouterConnector.xml"
}
}
},
"refConfig": {
"isRefByValueOnly": true
}
}
},
"##headers": {
"type": "List",
"required": true,
"isHidden": true,
"@INTERNAL": true,
"defaultValue": [
{
"name": "Entaxy-Dynamic-Factory-Provider",
"type": "boolean",
"value": true
},
{
"name": "Entaxy-Dynamic-Factory-Url",
"type": "List",
"value": [
{
"@CALCULATED": {
"expression": "entaxy-resource://service-resources/${properties._serviceMetadata.serviceResourcesRoot}/${objectId}/${objectId}-connector-in.factory",
"lazy": false,
"resultType": "String"
}
}
]
}
]
}
},
"outputs": {
"init": {
"fields": {
"@IMPORT": [
{
"sourceFactoryId": "service-components",
"location": "outputs.specificProtectedServiceComponents.fields",
"prefix": ""
}
],
"@IMPORT": [
{
"sourceFactoryId": "service-components",
"location": "outputs.specificProtectedServiceComponents.fields",
"prefix": ""
}
],
"authorizationType": {
"@TYPEINFO": {
"type": "enum",
"values": [
"JAAS",
"OAUTH STAND ALONE",
"OAUTH INTROSPECT"
],
"isEmptyIncluded": false
},
"@UI": {
"manageDisplayBlocksByValue": true
}
},
"connectorInFactory": {},
"##headers": {}
}
},
"connectorInFactory": {
"fields": {
"service": {},
"serviceId": {}
}
"fields": {
"service": {},
"serviceId": {}
},
"config": {
"@SKIP_VAULTS_LOOKUP": ""
}
},
"specificProtectedComponents": {
"scopes": ["private"],
"config": {
"configurable": false,
"@SKIP_PUBLISH": {}
},
"fields": {
"serviceId": {}
}
"scopes": [
"private"
],
"config": {
"configurable": false,
"@SKIP_PUBLISH": {}
},
"fields": {
"serviceId": {}
}
}
}
}
}

View File

@ -1,9 +1,9 @@
{
"factory": {
"id": "openapi-based-rest-service-public",
"displayName": "SERVICE :: REST :: OPENAPI :: PUBLIC",
"displayName": "REST :: OPENAPI :: PUBLIC",
"type": "entaxy.runtime.service",
"description": "",
"description": "Public openapi-based REST service. For more details see <a target=\"_blank\" href=\"https://docs.entaxy.ru/entaxy-core/${project.version}/core/schema/Rest_services.html\">Entaxy docs</a>",
"isAbstract": false,
"parent": "openapi-based-rest-service",
"label": "service,rest,openapi",
@ -27,5 +27,11 @@
}
},
"outputs": {
"init": {
"fields" : {
"removeAllHeadersBeforeAnswering": {},
"generateLoggingKey": {}
}
}
}
}
}

View File

@ -1,7 +1,7 @@
{
"factory": {
"id": "openapi-based-rest-service",
"displayName": "SERVICE :: REST :: OPENAPI :: ABSTRACT",
"displayName": "REST :: OPENAPI :: ABSTRACT",
"type": "entaxy.runtime.service",
"description": "",
"isAbstract": true,
@ -13,6 +13,7 @@
"fields": {
"serviceTitle": {
"displayName": "Title",
"description": "The title of the API. Populated automatically based on the selected YAML/JSON resource. For more details see <a target=\"_blank\" href=\"https://docs.entaxy.ru/entaxy-core/${project.version}/core/schema/Rest_services.html\">Entaxy docs</a>",
"type": "String",
"group": "main",
"required": false,
@ -29,15 +30,9 @@
]
}
},
"enableAuthorization": {
"displayName": "Enable Authorization",
"type": "boolean",
"required": true,
"group": "main",
"defaultValue": true
},
"operationRouter": {
"displayName": "Operation Router",
"description": "Defines how service operations are routed by configuring specific actions to be executed upon receiving requests for each operation of a service.",
"type": "xml:route",
"required": true,
"group": "main",
@ -45,7 +40,7 @@
"_provider": "entaxy-file-internal",
"endType": "String",
"format": "base64",
"preprocess": [
"postprocess_bak": [
{
"processor": "xslt",
"source": "entaxy-file-internal:routes-common/service-commons.xslt",
@ -82,7 +77,27 @@
}
}
}
]
],
"postprocess": [
{
"processor": "component-library",
"parameters": {
"serviceType": {
"@CALCULATED": {
"expression": "${#OWNER#.#FACTORY#.#TYPEINFO#.serviceType}",
"lazy": false
}
},
"serviceScope": {
"@CALCULATED": {
"expression": "${#OWNER#.#FACTORY#.#TYPEINFO#.serviceScope}",
"lazy": false
}
}
}
}
]
},
"defaultValue": {
"@RESOURCE": {
@ -118,6 +133,7 @@
"type": "Map",
"required": true,
"isHidden": true,
"@INTERNAL": true,
"defaultValue": {
"@RESOURCE_META": {
"url": {
@ -146,6 +162,7 @@
"type": "Map",
"required": true,
"isHidden": true,
"@INTERNAL": true,
"defaultValue": {
"@RESOURCE_META": {
"url": {
@ -162,6 +179,7 @@
"type": "list",
"required": true,
"isHidden": true,
"@INTERNAL": true,
"defaultValue": {
"@INHERIT": {
"resources": "append"
@ -190,7 +208,6 @@
"config": {},
"fields": {
"serviceTitle": {},
"enableAuthorization": {},
"operationRouter": {},
"_serviceMetadata": {},
"_parentRuntimeResources": {},
@ -202,10 +219,25 @@
"filter": ["*.yaml", "*.json"]
}
},
"displayServiceSchema": {
"group": "main"
"@IMPORT": [
{
"sourceFactoryId": "service-components",
"location": "outputs.serviceSecurity.fields",
"prefix": ""
}
],
"displayServiceSchema": {},
"authorizationType": {
"@TYPEINFO": {
"type": "enum",
"values": ["NONE", "JAAS", "OAUTH STAND ALONE", "OAUTH INTROSPECT"],
"isEmptyIncluded": false
},
"@UI": {
"manageDisplayBlocksByValue": true
}
}
}
}
}
}
}

View File

@ -18,98 +18,374 @@
"fields": {
}
},
"schemaBasedService":{
"fields": {
"schemaUrl": {
"displayName": "Schema URL",
"type": "Url",
"group": "schema",
"required": true,
"@TYPEINFO": {
"resourceProvider": "schemas",
"filter": "*.yaml",
"target": "resource"
}
},
"displayServiceSchema": {
"displayName": "Public Service Schema",
"type": "Boolean",
"group": "schema",
"required": true,
"defaultValue": false
}
}
"schemaBasedService": {
"fields": {
"schemaUrl": {
"displayName": "Schema URL",
"description": "The resource on which the current service is based.",
"type": "Url",
"group": "schema",
"required": true,
"@TYPEINFO": {
"resourceProvider": "schemas",
"filter": "*.yaml",
"target": "resource"
}
}
}
},
"schemaResourceBasedService": {
"fields": {
"@IMPORT": [
{
"sourceFactoryId": "#",
"location": "outputs.schemaBasedService.fields",
"prefix": ""
}
],
"schemaUrl": {
"@TYPEINFO": {
"resourceProvider": "schemas",
"filter": "*.schema",
"target": "resource"
}
},
"##publish": {
"defaultValue": {
"@INHERIT": {
"resources": "append"
},
"resources":[
{
"@CALCULATED": {
"lazy": false,
"expression": "${properties.schemaUrl};runtime"
}
}
]
}
}
}
"fields": {
"@IMPORT": [
{
"sourceFactoryId": "#",
"location": "outputs.schemaBasedService.fields",
"prefix": ""
}
],
"schemaUrl": {
"@TYPEINFO": {
"resourceProvider": "schemas",
"filter": "*.schema",
"target": "resource"
}
},
"##publish": {
"defaultValue": {
"@INHERIT": {
"resources": "append"
},
"resources": [
{
"@CALCULATED": {
"lazy": false,
"expression": "${properties.schemaUrl};runtime"
}
}
]
}
}
}
},
"specificProtectedServiceComponents":{
"fields": {
"connectorDispatchingBeans": {
"type": "entaxy.runtime.service.component",
"isRef": true,
"required": true,
"isHidden": true,
"isRefByValueOnly": true,
"@INTERNAL": true,
"defaultValue": {
"factoryId": "service-components",
"type": "entaxy.runtime.service.component",
"outputType": "connectorDispatchingBeans",
"scope": "private",
"properties": {
"serviceId": {
"@CALCULATED": {
"lazy": false,
"expression": "${#OWNER#.objectId}"
}
}
}
}
}
}
"specificProtectedServiceComponents": {
"fields": {
"connectorDispatchingBeans": {
"type": "entaxy.runtime.service.component",
"isRef": true,
"required": true,
"isHidden": true,
"isRefByValueOnly": true,
"@INTERNAL": true,
"defaultValue": {
"factoryId": "service-components",
"type": "entaxy.runtime.service.component",
"outputType": "connectorDispatchingBeans",
"scope": "private",
"properties": {
"serviceId": {
"@CALCULATED": {
"lazy": false,
"expression": "${#OWNER#.objectId}"
}
}
}
}
}
}
},
"connectorDispatchingBeans": {
"scopes": ["private"],
"fields": {
"serviceId": {
"type": "String"
}
},
"config": {
"configurable": false,
"@SKIP_PUBLISH": {}
}
"scopes": [
"private"
],
"fields": {
"serviceId": {
"type": "String"
}
},
"config": {
"configurable": false,
"@SKIP_PUBLISH": {}
}
},
"serviceSecurity": {
"scopes": [
"private"
],
"fields": {
"authorizationType": {
"displayName": "Authorization Type",
"description": "The type of authorization used to access the service. <br/> JAAS: Provides authorization using Java Authentication and Authorization Service (JAAS), which supports management of multiple realms; <br/> OAUTH STAND ALONE: Provides stand-alone authorization using locally managed keys and settings, independent of external services (OAuth2); <br/> OAUTH INTROSPECT: Provides verification and validation of access tokens by calling the introspection endpoint to obtain information about the token and its state (OAuth2). <br/> For more details see <a target=\"_blank\" href=\"https://docs.entaxy.ru/entaxy-core/${project.version}/core/security/security.html\">Entaxy docs</a>",
"type": "string",
"required": true,
"group": "security",
"defaultValue": "JAAS"
},
"authorizationRealm": {
"displayName": "Authorization realm",
"type": "entaxy.security.jaas.realm",
"description": "Defines an authorization realm for the service and associates it with the corresponding security settings. For more details see <a target=\"_blank\" href=\"https://docs.entaxy.ru/entaxy-core/${project.version}/core/security/security-jaas.html\">Entaxy docs</a>",
"required": false,
"group": "security",
"__defaultValue": "karaf",
"__filter": {
"label": "*"
},
/* "importPrefix": "camel_", */
"immutable": false,
"isRef": true,
"isRefByValueOnly": true,
"resolveAlways": true,
"refField": "objectId",
"@TYPEINFO": {
"enablePrivateObjectCreation": false,
"updateParentFields": true,
"isEmptyIncluded": true
},
"@UI": {
"displayBlocks": [
"JAAS"
],
"required": true
}
},
"displayServiceSchema": {
"description": "Enables public access to the service schema regardless of authentication.",
"displayName": "Public Service Schema",
"type": "Boolean",
"group": "security",
"required": true,
"defaultValue": false,
"@UI": {
"displayBlocks": [
"JAAS",
"OAUTH STAND ALONE",
"OAUTH INTROSPECT"
],
"required": true
}
},
"restrictByRoles": {
"displayName": "Restrict access by roles",
"description": "Enables to restrict access to the service based on roles. For more details see <a target=\"_blank\" href=\"https://docs.entaxy.ru/entaxy-core/${project.version}/core/security/security-jaas.html\">Entaxy docs</a>",
"type": "boolean",
"required": false,
"group": "security",
"defaultValue": false,
"@UI": {
"displayBlocks": [
"JAAS",
"OAUTH STAND ALONE"
],
"required": true
}
},
"globalRoles": {
"displayName": "Roles allowed to access",
"description": "List of roles that are allowed to access the service. For more details see <a target=\"_blank\" href=\"https://docs.entaxy.ru/entaxy-core/${project.version}/core/security/security-jaas.html\">Entaxy docs</a>",
"type": "String",
"required": false,
"group": "security",
"condition": "${restrictByRoles}",
"defaultValue": "*",
"@UI": {
"displayBlocks": [
"JAAS",
"OAUTH STAND ALONE"
],
"required": true
}
},
"jwtAuthzFilterRegexp": {
"defaultValue": "\\W+",
"displayName": "Regexp for jwt auth filter",
"description": "Regexp for jwt auth filter. For more details see <a target=\"_blank\" href=\"https://docs.entaxy.ru/entaxy-core/${project.version}/core/security/oauth.html\">Entaxy docs</a>",
"type": "String",
"required": false,
"group": "security",
"@UI": {
"displayBlocks": [
"OAUTH STAND ALONE"
],
"required": true
}
},
"jwtAuthzFilterRoleClaim": {
"defaultValue": "roles",
"displayName": "Role claims for jwt auth filter",
"type": "String",
"isHidden": true,
"required": false,
"group": "security",
"@UI": {
"displayBlocks": [
"OAUTH STAND ALONE"
],
"required": true
}
},
"jwtAuthzFilterValidateAudience": {
"defaultValue": "false",
"displayName": "Validate audience for jwt auth filter",
"type": "Boolean",
"isHidden": true,
"required": false,
"group": "security",
"@UI": {
"displayBlocks": [
"OAUTH STAND ALONE"
],
"required": true
}
},
"jwtKeystore": {
"displayName": "Keystore",
"description": "Keystore used for token verification. For more details see <a target=\"_blank\" href=\"https://docs.entaxy.ru/entaxy-core/${project.version}/core/security/keystores.html\">Entaxy docs</a> and <a target=\"_blank\" href=\"https://docs.entaxy.ru/entaxy-core/${project.version}/core/security/oauth.html\">Entaxy docs</a>",
"type": "Url",
"required": false,
"group": "security",
"@TYPEINFO": {
"resourceProvider": "entaxy-keystore",
"filter": [
"*.jks",
"*.pkcs12",
"*.jwk"
],
"target": "resource"
},
"@UI": {
"displayBlocks": [
"OAUTH STAND ALONE"
],
"required": true
}
},
"jwtAlias": {
"displayName": "Jwt Alias",
"description": "The alias of the certificate from the selected keystore. For more details see <a target=\"_blank\" href=\"https://docs.entaxy.ru/entaxy-core/${project.version}/core/security/keystores.html\">Entaxy docs</a> and <a target=\"_blank\" href=\"https://docs.entaxy.ru/entaxy-core/${project.version}/core/security/oauth.html\">Entaxy docs</a>",
"type": "String",
"required": false,
"group": "security",
"@TYPEINFO": {
"type": "list",
"source": {
"property": "jwtKeystore",
"sourceType": "resource",
"path": "#metadata#.keystore.aliases",
"type": "property"
},
"dependsOn": ["jwtKeystore"]
},
"@UI": {
"displayBlocks": [
"OAUTH STAND ALONE"
],
"required": true
}
},
"audienceIsEndpointAddress": {
"defaultValue": "false",
"displayName": "Validate audience endpoint address",
"type": "Boolean",
"isHidden": true,
"required": false,
"group": "security",
"@UI": {
"displayBlocks": [
"OAUTH INTROSPECT"
],
"required": true
}
},
"introspectContentType": {
"defaultValue": "application/x-www-form-urlencoded",
"displayName": "Introspect Content-Type",
"type": "String",
"isHidden": true,
"required": false,
"group": "security",
"@UI": {
"displayBlocks": [
"OAUTH INTROSPECT"
],
"required": true
}
},
"introspectAuthorizationLogin": {
"defaultValue": "",
"displayName": "Introspect Authorization Login",
"description": "Authorization login used to access the identity provider. For more details see <a target=\"_blank\" href=\"https://docs.entaxy.ru/entaxy-core/${project.version}/core/security/oauth.html\">Entaxy docs</a>",
"type": "String",
"required": false,
"group": "security",
"@UI": {
"displayBlocks": [
"OAUTH INTROSPECT"
],
"required": true
}
},
"introspectAuthorizationPasswordVault": {
"defaultValue": "$ENTAXY_SECRETS{password@for-service}",
"description": "Authorization password used to access the identity provider. It is possible to use secrets with $ENTAXY_SECRETS{your_alias@your_vault}. For more details see <a target=\"_blank\" href=\"https://docs.entaxy.ru/entaxy-core/${project.version}/core/security/vaults.html\">Entaxy docs</a> and <a target=\"_blank\" href=\"https://docs.entaxy.ru/entaxy-core/${project.version}/core/security/oauth.html\">Entaxy docs</a>",
"displayName": "Introspect Authorization Password",
"type": "String",
"required": false,
"group": "security",
"@UI": {
"displayBlocks": [
"OAUTH INTROSPECT"
],
"required": true
}
},
"introspectAccept": {
"defaultValue": "application/json",
"displayName": "Introspect Accept",
"description": "Authorization Accept used to access the identity provider. For more details see <a target=\"_blank\" href=\"https://docs.entaxy.ru/entaxy-core/${project.version}/core/security/oauth.html\">Entaxy docs</a>",
"type": "String",
"required": false,
"isHidden": true,
"group": "security",
"@UI": {
"displayBlocks": [
"OAUTH INTROSPECT"
],
"required": true
}
},
"introspectAddress": {
"displayName": "Introspect URL",
"description": "Authorization URL used to access the identity provider. For more details see <a target=\"_blank\" href=\"https://docs.entaxy.ru/entaxy-core/${project.version}/core/security/oauth.html\">Entaxy docs</a>",
"type": "String",
"required": false,
"group": "security",
"@UI": {
"displayBlocks": [
"OAUTH INTROSPECT"
],
"required": true
}
},
"introspectHttpReceiveTimeout": {
"defaultValue": "60",
"displayName": "Http receive timeout",
"description": "Http receive timeout used to access the identity provider. For more details see <a target=\"_blank\" href=\"https://docs.entaxy.ru/entaxy-core/${project.version}/core/security/oauth.html\">Entaxy docs</a>",
"type": "integer",
"javaType": "java.lang.Integer",
"required": false,
"group": "security",
"@UI": {
"displayBlocks": [
"OAUTH INTROSPECT"
],
"required": true
}
}
},
"config": {
"configurable": false,
"@SKIP_PUBLISH": {}
}
}
}
}
}

View File

@ -6,184 +6,183 @@
},
"entaxy.runtime.service.support": {},
"fields": {
"operationRouterFieldTemplate": {
"type": "xml:route",
"required": true,
"_isRef": true,
"_isRefByValueOnly": true,
"@RESOURCE": {
"endType": "String",
"provider": "service-resources",
"scope": "design",
"##meta": {
"resource": {
"generated": true,
"parentResource": {
"@CALCULATED": {
"expression": "${#OWNER#.properties.parentResource}",
"resultType": "string",
"lazy": false
}
}
},
"service": {
"@CALCULATED": {
"expression": "${#OWNER#.properties.service}",
"resultType": "map",
"lazy": false
}
}
},
"location": {
"@CALCULATED": {
"expression": "${#OWNER#.properties.service.serviceResourcesRoot}/operationRouterSuffix.xml",
"lazy": false
}
},
"service": {
"@CALCULATED": {
"expression": "${#OWNER#.properties.service}",
"resultType": "map",
"lazy": false
}
}
},
"defaultValue": {
"type": "entaxy.runtime.service.support",
"factoryId": "#OWNER#",
"outputType": "operationRouterSuffix",
"scope": "public",
"properties": {
"service": {
"@CALCULATED": {
"expression": "${#OWNER#.properties.service}",
"resultType": "map",
"lazy": false
}
},
"parentResource": {
"@CALCULATED": {
"expression": "${#OWNER#.properties.parentResource}",
"resultType": "string",
"lazy": false
}
}
},
"refConfig": {
"isRefByValueOnly": true
}
}
},
"service": {
"required": true,
"type": "Map"
},
"operationRouterPublic": {
"@IMPORT": [
{
"sourceFactoryId": "#",
"location": "fields.operationRouterFieldTemplate",
"prefix": ""
}
],
"@RESOURCE": {
"location": {
"@CALCULATED": {
"expression": "${#OWNER#.properties.service.serviceResourcesRoot}/operationRouterPublic.xml"
}
}
},
"defaultValue": {
"outputType": "operationRouterPublic"
}
},
"operationRouterProtected": {
"@IMPORT": [
{
"sourceFactoryId": "#",
"location": "fields.operationRouterFieldTemplate",
"prefix": ""
}
],
"@RESOURCE": {
"location": {
"@CALCULATED": {
"expression": "${#OWNER#.properties.service.serviceResourcesRoot}/operationRouterProtected.xml"
}
}
},
"defaultValue": {
"outputType": "operationRouterProtected"
}
},
"operationRouterConnector": {
"@IMPORT": [
{
"sourceFactoryId": "#",
"location": "fields.operationRouterFieldTemplate",
"prefix": ""
}
],
"@RESOURCE": {
"location": {
"@CALCULATED": {
"expression": "${#OWNER#.properties.service.serviceResourcesRoot}/operationRouterConnector.xml"
}
}
},
"defaultValue": {
"outputType": "operationRouterConnector"
}
}
"operationRouterFieldTemplate": {
"type": "xml:route",
"required": true,
"_isRef": true,
"_isRefByValueOnly": true,
"@RESOURCE": {
"endType": "String",
"provider": "service-resources",
"scope": "design",
"##meta": {
"resource": {
"generated": true,
"parentResource": {
"@CALCULATED": {
"expression": "${#OWNER#.properties.parentResource}",
"resultType": "string",
"lazy": false
}
}
},
"service": {
"@CALCULATED": {
"expression": "${#OWNER#.properties.service}",
"resultType": "map",
"lazy": false
}
}
},
"location": {
"@CALCULATED": {
"expression": "${#OWNER#.properties.service.serviceResourcesRoot}/operationRouterSuffix.xml",
"lazy": false
}
},
"service": {
"@CALCULATED": {
"expression": "${#OWNER#.properties.service}",
"resultType": "map",
"lazy": false
}
}
},
"defaultValue": {
"type": "entaxy.runtime.service.support",
"factoryId": "#OWNER#",
"outputType": "operationRouterSuffix",
"scope": "public",
"properties": {
"service": {
"@CALCULATED": {
"expression": "${#OWNER#.properties.service}",
"resultType": "map",
"lazy": false
}
},
"parentResource": {
"@CALCULATED": {
"expression": "${#OWNER#.properties.parentResource}",
"resultType": "string",
"lazy": false
}
}
},
"refConfig": {
"isRefByValueOnly": true
}
}
},
"service": {
"required": true,
"type": "Map"
},
"operationRouterPublic": {
"@IMPORT": [
{
"sourceFactoryId": "#",
"location": "fields.operationRouterFieldTemplate",
"prefix": ""
}
],
"@RESOURCE": {
"location": {
"@CALCULATED": {
"expression": "${#OWNER#.properties.service.serviceResourcesRoot}/operationRouterPublic.xml"
}
}
},
"defaultValue": {
"outputType": "operationRouterPublic"
}
},
"operationRouterProtected": {
"@IMPORT": [
{
"sourceFactoryId": "#",
"location": "fields.operationRouterFieldTemplate",
"prefix": ""
}
],
"@RESOURCE": {
"location": {
"@CALCULATED": {
"expression": "${#OWNER#.properties.service.serviceResourcesRoot}/operationRouterProtected.xml"
}
}
},
"defaultValue": {
"outputType": "operationRouterProtected"
}
},
"operationRouterConnector": {
"@IMPORT": [
{
"sourceFactoryId": "#",
"location": "fields.operationRouterFieldTemplate",
"prefix": ""
}
],
"@RESOURCE": {
"location": {
"@CALCULATED": {
"expression": "${#OWNER#.properties.service.serviceResourcesRoot}/operationRouterConnector.xml"
}
}
},
"defaultValue": {
"outputType": "operationRouterConnector"
}
}
},
"outputs": {
"init": {
"isDefault": true,
"fields": {
"service": {},
"parentResource": {},
"operationRouterPublic": {},
"operationRouterProtected": {},
"operationRouterConnector": {}
"service": {},
"parentResource": {},
"operationRouterPublic": {},
"operationRouterProtected": {},
"operationRouterConnector": {}
},
"config": {
"configurable": false
"configurable": false,
"@SKIP_VAULTS_LOOKUP": ""
}
},
},
"operationRouterPublic": {
"isDefault": false,
"fields": {
"service": {},
"parentResource": {}
"service": {},
"parentResource": {}
},
"config": {
"configurable": false
"configurable": false,
"@SKIP_VAULTS_LOOKUP": ""
}
},
"operationRouterProtected": {
"isDefault": false,
"fields": {
"service": {},
"parentResource": {}
"service": {},
"parentResource": {}
},
"config": {
"configurable": false
"configurable": false,
"@SKIP_VAULTS_LOOKUP": ""
}
},
"operationRouterConnector": {
"isDefault": false,
"fields": {
"service": {},
"parentResource": {}
"service": {},
"parentResource": {}
},
"config": {
"configurable": false
"configurable": false,
"@SKIP_VAULTS_LOOKUP": ""
}
}
}
}
}

View File

@ -7,15 +7,27 @@
"isAbstract": true
},
"entaxy.runtime.connector": {
"exclusiveMode": "NON_EXCLUSIVE_ONLY"
"exclusiveMode": "NON_EXCLUSIVE_ONLY",
"type": "service-soap",
"protocol": "service-soap",
"serviceType": "SOAP"
},
"fields": {},
"outputs": {
"init": {
"isDefault": true,
"fields": {
"removeAllHeadersBeforeAnswering": {
"isHidden": true
},
"generateLoggingKey": {
"isHidden": true,
"defaultValue": false
}
},
"config": {
"configurable": true
}
}
}
}
}

View File

@ -18,6 +18,7 @@
"address": {
"displayName": "Address",
"type": "String",
"description": "The service publication address. Specifies the address at which the service will be available for interaction with other system components. If the field is left blank, it will be generated automatically based on the Service Id. For more details see <a target=\"_blank\" href=\"https://docs.entaxy.ru/entaxy-core/${project.version}/core/schema/Soap_services.html\">Entaxy docs</a>",
"required": true,
"group": "main",
"defaultValue": {
@ -83,4 +84,4 @@
}
}
}
}
}

View File

@ -1,15 +1,17 @@
{
"factory": {
"id": "wsdl-based-soap-service-protected",
"displayName": "SERVICE :: SOAP :: WSDL :: PROTECTED",
"displayName": "SOAP :: WSDL :: PROTECTED",
"type": "entaxy.runtime.service",
"description": "Protected WSDL-based SOAP service",
"description": "Protected WSDL-based SOAP service. For more details see <a target=\"_blank\" href=\"https://docs.entaxy.ru/entaxy-core/${project.version}/core/schema/Soap_services.html\">Entaxy docs</a>",
"isAbstract": false,
"parent": "wsdl-based-soap-service-public",
"label": "service,soap",
"category": ""
},
"entaxy.runtime.service": {},
"entaxy.runtime.service": {
"serviceScope": "protected"
},
"fields": {
"operationRouter": {
"defaultValue": {
@ -25,14 +27,15 @@
"location": "${serviceResourcesRoot}/${port}/operationRouterProtected.xml"
}
},
"enableAuthorization": {
"authorizationType": {
"isHidden": true,
"defaultValue": true
"defaultValue": "JAAS"
},
"connectorInFactory": {
"type": "factory",
"required": true,
"isHidden": true,
"@INTERNAL": true,
"_isRef": true,
"_isRefByValueOnly": true,
"@RESOURCE": {
@ -76,6 +79,14 @@
"lazy": false
}
},
"serviceObjectType": "entaxy.runtime.service",
"serviceType": {
"@CALCULATED": {
"expression": "${#OWNER_OF_TYPE:entaxy.runtime.service#.#FACTORY#.#TYPEINFO#.serviceType}",
"resultType": "String",
"lazy": false
}
},
"location": {
"@CALCULATED": {
"lazy": false,
@ -93,6 +104,7 @@
"type": "List",
"required": true,
"isHidden": true,
"@INTERNAL": true,
"defaultValue": [
{
"name": "Entaxy-Dynamic-Factory-Provider",
@ -134,7 +146,10 @@
"fields": {
"service": {},
"serviceId": {}
}
},
"config": {
"@SKIP_VAULTS_LOOKUP": ""
}
}
}
}
}

View File

@ -1,9 +1,9 @@
{
"factory": {
"id": "wsdl-based-soap-service-public",
"displayName": "SERVICE :: SOAP :: WSDL :: PUBLIC",
"displayName": "SOAP :: WSDL :: PUBLIC",
"type": "entaxy.runtime.service",
"description": "",
"description": "Public WSDL-based SOAP service. For more details see <a target=\"_blank\" href=\"https://docs.entaxy.ru/entaxy-core/${project.version}/core/schema/Soap_services.html\">Entaxy docs</a>",
"isAbstract": false,
"parent": "wsdl-based-soap-service",
"label": "service,soap",
@ -32,7 +32,15 @@
"generator": "",
"config": {},
"fields": {
"generateLoggingKey": {},
"removeAllHeadersBeforeAnswering": {},
"authorizationType": {
"required": true,
"@UI": {
"manageDisplayBlocksByValue": true
}
}
}
}
}
}
}

View File

@ -12,6 +12,7 @@
"fields": {
"serviceFullName": {
"displayName": "Service Full Name",
"description": "Full name of the selected service from the WSDL resource. For more details see <a target=\"_blank\" href=\"https://docs.entaxy.ru/entaxy-core/${project.version}/core/schema/Soap_services.html\">Entaxy docs</a>",
"type": "String",
"group": "main",
"required": true,
@ -23,11 +24,14 @@
"path": "#metadata#.wsdl.services",
"type": "property"
},
"dependsOn": ["schemaUrl"]
"dependsOn": [
"schemaUrl"
]
}
},
"port": {
"displayName": "Port",
"description": "The port of the selected service from the WSDL resource. For more details see <a target=\"_blank\" href=\"https://docs.entaxy.ru/entaxy-core/${project.version}/core/schema/Soap_services.html\">Entaxy docs</a>",
"type": "String",
"group": "main",
"required": true,
@ -39,18 +43,29 @@
"path": "#metadata#.wsdl.${serviceFullName}.ports",
"type": "property"
},
"dependsOn": ["schemaUrl", "serviceFullName"]
"dependsOn": [
"schemaUrl",
"serviceFullName"
]
}
},
"enableAuthorization": {
"displayName": "Enable Authorization",
"type": "boolean",
"authorizationType": {
"displayName": "Authorization Type",
"type": "string",
"required": true,
"group": "main",
"defaultValue": true
},
"defaultValue": "JAAS",
"@TYPEINFO": {
"type": "enum",
"values": [
"NONE",
"JAAS"
],
"isEmptyIncluded": false
}
},
"dataFormat": {
"displayName": "Data Format",
"description": "Supported data formats: <br/> PAYLOAD is the message payload (the contents of the soap:body) after message configuration in the CXF endpoint is applied. Only Protocol JAX-WS handler is supported. Logical JAX-WS handler is not supported. <br/> CXF_MESSAGE allows for invoking the full capabilities of CXF interceptors by converting the message from the transport layer into a raw SOAP message <br/> For more details see <a target=\"_blank\" href=\"https://docs.entaxy.ru/entaxy-core/${project.version}/core/schema/Soap_services.html\">Entaxy docs</a>",
"type": "String",
"required": true,
"group": "main",
@ -58,16 +73,14 @@
"type": "enum",
"values": [
"PAYLOAD",
"RAW",
"MESSAGE",
"CXF_MESSAGE",
"POJO"
"CXF_MESSAGE"
]
},
"defaultValue": "PAYLOAD"
},
"mtomEnabled": {
"displayName": "MTOM Enabled",
"description": "Enables MTOM (attachments). This requires to use POJO or PAYLOAD data format mode. For more details see <a target=\"_blank\" href=\"https://docs.entaxy.ru/entaxy-core/${project.version}/core/schema/Soap_services.html\">Entaxy docs</a>",
"type": "Boolean",
"required": true,
"group": "main",
@ -75,6 +88,7 @@
},
"schemaValidationEnabled": {
"displayName": "Schema Validation Enabled",
"description": "Enables schema validation for messages. Throws an exception if the message does not comply with the specified XML schema. For more details see <a target=\"_blank\" href=\"https://docs.entaxy.ru/entaxy-core/${project.version}/core/schema/Soap_services.html\">Entaxy docs</a>",
"type": "Boolean",
"required": true,
"group": "main",
@ -84,6 +98,7 @@
"type": "Map",
"required": true,
"isHidden": true,
"@INTERNAL": true,
"defaultValue": {
"@RESOURCE_META": {
"url": {
@ -127,6 +142,7 @@
},
"operationRouter": {
"displayName": "Operation Router",
"description": "Defines how service operations are routed by configuring specific actions to be executed upon receiving requests for each operation of a service.",
"type": "xml:route",
"required": true,
"group": "main",
@ -134,7 +150,7 @@
"_provider": "entaxy-file-internal",
"endType": "String",
"format": "base64",
"preprocess": [
"postprocess_bak": [
{
"processor": "xslt",
"source": "entaxy-file-internal:routes-common/service-commons.xslt",
@ -171,6 +187,25 @@
}
}
}
],
"postprocess": [
{
"processor": "component-library",
"parameters": {
"serviceType": {
"@CALCULATED": {
"expression": "${#OWNER#.#FACTORY#.#TYPEINFO#.serviceType}",
"lazy": false
}
},
"serviceScope": {
"@CALCULATED": {
"expression": "${#OWNER#.#FACTORY#.#TYPEINFO#.serviceScope}",
"lazy": false
}
}
}
}
]
},
"defaultValue": {
@ -195,7 +230,11 @@
"path": "#metadata#.wsdl.${serviceFullName}.serviceResourcesRoot",
"type": "property"
},
"dependsOn": ["schemaUrl", "serviceFullName", "port"]
"dependsOn": [
"schemaUrl",
"serviceFullName",
"port"
]
},
"config": {
"scope": "public"
@ -210,29 +249,36 @@
]
},
"outputs": {
"init": {
"fields": {
"schemaUrl": {
"displayName": "WSDL schema",
"group": "main",
"@TYPEINFO": {
"filter": "*.wsdl"
}
},
"serviceFullName": {},
"port": {},
"enableAuthorization": {},
"dataFormat": {},
"mtomEnabled": {},
"schemaValidationEnabled": {},
"operationRouter": {},
"_serviceMetadata": {},
"serviceName": {},
"serviceNamespace": {},
"displayServiceSchema": {
"group": "main"
}
}
}
"init": {
"fields": {
"schemaUrl": {
"description": "The resource on which the current service is based. For more details see <a target=\"_blank\" href=\"https://docs.entaxy.ru/entaxy-core/${project.version}/core/schema/Soap_services.html\">Entaxy docs</a>",
"displayName": "WSDL schema",
"group": "main",
"@TYPEINFO": {
"filter": "*.wsdl",
"useShortUrl": true
}
},
"@IMPORT": [
{
"sourceFactoryId": "service-components",
"location": "outputs.serviceSecurity.fields",
"prefix": ""
}
],
"serviceFullName": {},
"port": {},
"authorizationType": {},
"dataFormat": {},
"mtomEnabled": {},
"schemaValidationEnabled": {},
"operationRouter": {},
"_serviceMetadata": {},
"serviceName": {},
"serviceNamespace": {},
"displayServiceSchema": {}
}
}
}
}
}

View File

@ -47,20 +47,20 @@
</from>
</xsl:template>
<xsl:template match="//route/operation-router" exclude-result-prefixes="xsl fn xs local">
<xsl:template match="//route//operation-router" exclude-result-prefixes="xsl fn xs local">
<choice>
<xsl:apply-templates select="child::node()" />
</choice>
</xsl:template>
<xsl:template match="//route/operation-router/operation" exclude-result-prefixes="xsl fn xs local">
<xsl:template match="//route//operation-router/operation" exclude-result-prefixes="xsl fn xs local">
<when>
<simple>${headers.operationName} == '<xsl:value-of select="@name" />'</simple>
<xsl:apply-templates select="child::node()" />
</when>
</xsl:template>
<xsl:template match="//route/operation-router/unknown-operation" exclude-result-prefixes="xsl fn xs local">
<xsl:template match="//route//operation-router/unknown-operation" exclude-result-prefixes="xsl fn xs local">
<otherwise>
<xsl:apply-templates select="child::node()" />
</otherwise>

View File

@ -34,7 +34,7 @@
<xsl:apply-templates select="child::node()" />
</xsl:template>
<xsl:template match="//route/operation-router/operation/connector" exclude-result-prefixes="xsl fn xs local">
<xsl:template match="//route//operation-router/operation/connector" exclude-result-prefixes="xsl fn xs local">
<log loggingLevel="INFO">
<xsl:attribute name="message" select="concat('Sending to connector: ', @direction)"></xsl:attribute>
</log>

View File

@ -47,20 +47,20 @@
</from>
</xsl:template>
<xsl:template match="//route/operation-router" exclude-result-prefixes="xsl fn xs local">
<xsl:template match="//route//operation-router" exclude-result-prefixes="xsl fn xs local">
<choice>
<xsl:apply-templates select="child::node()" />
</choice>
</xsl:template>
<xsl:template match="//route/operation-router/operation" exclude-result-prefixes="xsl fn xs local">
<xsl:template match="//route//operation-router/operation" exclude-result-prefixes="xsl fn xs local">
<when>
<simple>${headers.operationName} == '<xsl:value-of select="@name" />'</simple>
<xsl:apply-templates select="child::node()" />
</when>
</xsl:template>
<xsl:template match="//route/operation-router/unknown-operation" exclude-result-prefixes="xsl fn xs local">
<xsl:template match="//route//operation-router/unknown-operation" exclude-result-prefixes="xsl fn xs local">
<otherwise>
<xsl:apply-templates select="child::node()" />
</otherwise>

View File

@ -19,19 +19,21 @@
[/#list]
-->
[#if properties.enableAuthorization]
[#if properties.authorizationType == "JAAS"]
<reference id="systemInterceptor" interface="org.apache.cxf.phase.PhaseInterceptor"
filter="(type=system)"/>
<reference id="authInterceptor" interface="org.apache.cxf.phase.PhaseInterceptor"
filter="(type=authentication)"/>
<reference id="serviceInterceptor" interface="org.apache.cxf.phase.PhaseInterceptor"
filter="(type=service)"
timeout="30000" availability="mandatory"/>
timeout="30000" availability="mandatory"/>
<bean id="resolveLoginInterceptor" class="ru.entaxy.platform.services.runtime.interceptor.ResolveLoginInterceptor" />
[/#if]
<!-- JAXRS providers -->
<bean id="jsonProvider" class="com.fasterxml.jackson.jaxrs.json.JacksonJsonProvider" />
<bean id="jsonProviderFactory" class="ru.entaxy.platform.core.objects.service.producing.JacksonJsonProviderFactory"/>
<bean id="jsonProvider" factory-ref="jsonProviderFactory" factory-method="create"/>
<!-- CXF OpenApiFeature -->
<bean id="openApiFeature" class="org.apache.cxf.jaxrs.openapi.OpenApiFeature">
@ -103,9 +105,10 @@
<ref component-id="openApiFeature"/>
</camelcxf:features>
<camelcxf:inInterceptors>
[#if properties.enableAuthorization]
[#if properties.authorizationType == "JAAS"]
<ref component-id="authInterceptor"/>
<ref component-id="systemInterceptor"/>
<ref component-id="resolveLoginInterceptor"/>
[/#if]
</camelcxf:inInterceptors>
</camelcxf:rsServer>
@ -122,6 +125,12 @@
<setHeader name="ENTAXY_EndpointName">
<simple>[=objectId]</simple>
</setHeader>
<setHeader name="NTX_ERROR_HANDLER_SYNC_TYPE">
<constant>application/json</constant>
</setHeader>
[#include "templates:service-components/generateLoggingKey.ftl"]
<to uri="direct:[=objectId]-operation-router" />
</route>

View File

@ -2,7 +2,7 @@
{
"factory": {
"id": "[=properties.serviceId]-rest-connector-in",
"displayName": "SERVICE :: REST :: [=properties.serviceId] :: CONNECTOR :: IN",
"displayName": "SERVICE :: REST :: [=properties.serviceId] :: IN",
"type": "entaxy.runtime.connector",
"description": "IN connector for REST service [=properties.serviceId]",
"parent": "abstract-service-rest-connector-in",
@ -16,12 +16,25 @@
"isHidden": true,
"defaultValue": "[=properties.serviceId]"
},
"##publish": {
"type": "Map",
"required": true,
"isHidden": true,
"defaultValue":{
"@INHERIT": {
"relation": "append"
},
"relation": [
"[=properties.serviceId]:[=properties.serviceObjectType]:connector:dependency:bounds"
]
}
},
"pre-route": {
"@RESOURCE": {
"@INHERIT": {
"__@INHERIT": {
"preprocess": "append"
},
"preprocess":[
"__preprocess":[
{
"processor": "xslt",
"source":"entaxy-file-internal:routes-common/soap-operation-router.xslt",
@ -35,8 +48,15 @@
}
}
],
"postprocess": [
{
"processor": "component-library",
"parameters": {
"serviceType": "[=properties.serviceType]"
}
}
]
},
"defaultValue": {
"@RESOURCE": {

View File

@ -21,27 +21,101 @@
[/#list]
-->
[#if properties.enableAuthorization]
<reference id="systemInterceptor" interface="org.apache.cxf.phase.PhaseInterceptor"
filter="(type=system)"/>
<reference id="authInterceptor" interface="org.apache.cxf.phase.PhaseInterceptor"
filter="(type=authentication)"/>
<reference id="serviceInterceptor" interface="org.apache.cxf.phase.PhaseInterceptor"
filter="(type=service)"
timeout="30000" availability="mandatory"/>
[#if properties.displayServiceSchema]
<bean id="isSchemaDisplayInterceptor" class="ru.entaxy.platform.services.runtime.interceptor.IsSchemaDisplayInterceptor">
<property name="isDisplayServiceSchema" value="[=displayServiceSchema?c]"/>
</bean>
[/#if]
[#if properties.authorizationType != "NONE" && properties.displayServiceSchema]
<bean id="publicOpenApiSchemaInterceptor" class="ru.entaxy.platform.services.runtime.interceptor.PublicOpenApiSchemaInterceptor">
</bean>
[#else]
<!-- use default behavior -->
[/#if]
[#if properties.authorizationType == "JAAS"]
<bean id="jaasLoginInterceptor" class="org.apache.cxf.interceptor.security.JAASLoginInterceptor">
<property name="contextName" value="[=properties.authorizationRealm]" />
<property name="roleClassifier" value="RolePrincipal"/>
<property name="roleClassifierType" value="classname"/>
<property name="allowAnonymous" value="false"/>
<property name="allowNamedPrincipals" value="true"/>
</bean>
<bean id="resolveProfileNameInterceptor" class="ru.entaxy.platform.services.runtime.interceptor.ResolveProfileNameInterceptor">
</bean>
<bean id="resolveLoginInterceptor" class="ru.entaxy.platform.services.runtime.interceptor.ResolveLoginInterceptor" />
[#if properties.restrictByRoles]
<bean id="simpleAuthorizingInterceptor" class="org.apache.cxf.interceptor.security.SimpleAuthorizingInterceptor">
<property name="methodRolesMap">
<map>
<!-- NOT IMPLEMENTED YET -->
<!-- no wildcard support, names need to match exactly -->
<!-- entry key="addNumbers" value="ROLE_USER ROLE_ADMIN"/>
<entry key="divideNumbers" value="ROLE_ADMIN"/ -->
</map>
</property>
<!-- its possible to define global roles that apply to all WSDL operations not listed above -->
<property name="globalRoles" value="[=properties.globalRoles]"/>
</bean>
[/#if]
[/#if]
[#if properties.authorizationType == "OAUTH STAND ALONE"]
<bean id="jwtAuthzFilter" class="ru.entaxy.platform.core.support.runtime.cxf.jose.ExtJwtAuthenticationFilter">
<property name="validateAudience" value="[=properties.jwtAuthzFilterValidateAudience]"/>
<property name="roleClaim" value="[=properties.jwtAuthzFilterRoleClaim]"/>
<property name="regexp" value="[=properties.jwtAuthzFilterRegexp]"/>
</bean>
[#if properties.restrictByRoles]
<bean id="authorizationInterceptor" class="org.apache.cxf.interceptor.security.SimpleAuthorizingInterceptor">
<!-- its possible to define global roles that apply to all WSDL operations not listed above -->
<property name="globalRoles" value="[=properties.globalRoles]"/>
</bean>
[/#if]
[/#if]
[#if properties.authorizationType == "OAUTH INTROSPECT"]
<camelcxf:rsClient id="tokenServiceClient" serviceClass="org.apache.cxf.jaxrs.client.WebClient"
address="[=properties.introspectAddress]">
<camelcxf:headers>
<entry key="Accept" value="[=properties.introspectAccept]"/>
<entry key="Content-Type" value="[=properties.introspectContentType]"/>
</camelcxf:headers>
<camelcxf:properties>
<entry key="http.receive.timeout" value="[=properties.introspectHttpReceiveTimeout]"/>
</camelcxf:properties>
<camelcxf:providers>
<ref component-id="jsonProvider"/>
</camelcxf:providers>
<camelcxf:outInterceptors>
<ref component-id="authInterceptor"/>
</camelcxf:outInterceptors>
</camelcxf:rsClient>
<bean id="authInterceptor" class="ru.entaxy.platform.core.support.runtime.cxf.BasicAuthenticationInterceptor">
<property name="login" value="[=properties.introspectAuthorizationLogin]"/>
<property name="password" value="[=properties.introspectAuthorizationPasswordVault]"/>
</bean>
<bean id="rsClient"
class="ru.entaxy.platform.core.support.runtime.cxf.EntaxyWebClient" factory-ref="tokenServiceClient"
factory-method="create" />
<bean id="tokenValidator" class="org.apache.cxf.rs.security.oauth2.filters.AccessTokenIntrospectionClient">
<property name="tokenValidatorClient" ref="rsClient"/>
</bean>
<bean id="oauthFilter" class="ru.entaxy.platform.core.support.runtime.cxf.security.oauth2.filters.DisplaySchemaOAuthRequestFilter">
<property name="tokenValidator" ref="tokenValidator"/>
<property name="audienceIsEndpointAddress" value="[=properties.audienceIsEndpointAddress]"/>
</bean>
[/#if]
<!-- JAXRS providers -->
<bean id="jsonProvider" class="com.fasterxml.jackson.jaxrs.json.JacksonJsonProvider" />
<!-- CXF OpenApiFeature -->
<bean id="jsonProviderFactory" class="ru.entaxy.platform.core.support.runtime.jackson.JacksonJsonProviderFactory">
<property name="addJodaModule" value="true"/>
<property name="acceptSingleValueAsArray" value="true"/>
<property name="failOnUnknownProperties" value="false"/>
</bean>
<bean id="jsonProvider" factory-ref="jsonProviderFactory" factory-method="create"/>
<!-- CXF OpenApiFeature -->
<bean id="openApiFeature" class="org.apache.cxf.jaxrs.openapi.OpenApiFeature">
<property name="runAsFilter" value="true" />
<property name="useContextBasedConfig" value="true" />
@ -75,9 +149,15 @@
<property name="bundleContext" ref="blueprintBundleContext"></property>
</bean>
[#assign finalAddress=properties.address]
[#if !finalAddress?starts_with('http://') && !finalAddress?starts_with('https://')]
[#if !finalAddress?starts_with('/')]
[#assign finalAddress='/'+properties.address]
[/#if]
[/#if]
<camelcxf:rsServer id="[=objectId]-rs-server"
address="/[=properties.address]"
address="[=finalAddress]"
loggingFeatureEnabled="true"
loggingSizeLimit="50"
bus="cxf-local-[=objectId]">
@ -90,35 +170,74 @@
</camelcxf:serviceBeans>
<camelcxf:providers>
<ref component-id="jsonProvider"/>
[#if properties.authorizationType == "OAUTH STAND ALONE"]
<ref component-id="jwtAuthzFilter"/>
[/#if]
[#if properties.authorizationType == "OAUTH INTROSPECT"]
<ref component-id="oauthFilter" />
[/#if]
</camelcxf:providers>
<camelcxf:features>
<ref component-id="openApiFeature"/>
</camelcxf:features>
<camelcxf:inInterceptors>
[#if properties.enableAuthorization]
[#if properties.displayServiceSchema]
<ref component-id="isSchemaDisplayInterceptor"/>
[/#if]
<ref component-id="authInterceptor"/>
<ref component-id="systemInterceptor"/>
[/#if]
[#if properties.displayServiceSchema]
<ref component-id="publicOpenApiSchemaInterceptor" />
[#else]
<!-- default behavior -->
[/#if]
[#if properties.authorizationType == "JAAS"]
<ref component-id="jaasLoginInterceptor" />
[#if properties.restrictByRoles]
<ref component-id="simpleAuthorizingInterceptor" />
[/#if]
<ref component-id="resolveProfileNameInterceptor" />
<ref component-id="resolveLoginInterceptor"/>
[/#if]
[#if properties.authorizationType == "OAUTH STAND ALONE" && properties.restrictByRoles]
<ref component-id="authorizationInterceptor"/>
[/#if]
</camelcxf:inInterceptors>
[#if properties.jwtKeystore??]
<camelcxf:properties>
<entry key="rs.security.signature.in.properties"
value="[=properties.jwtKeystore].data/$[=properties.jwtAlias].properties"/>
</camelcxf:properties>
[/#if]
</camelcxf:rsServer>
<camelContext id="openapi-[=objectId]-context" xmlns="http://camel.apache.org/schema/blueprint"
errorHandlerRef="commonErrorHandler">
<bean id="entaxyObjectMapper" class="ru.entaxy.platform.core.support.runtime.jackson.EntaxyObjectMapper"/>
<errorHandler id="commonErrorHandler" redeliveryPolicyRef="noRedelivery"
type="DeadLetterChannel" deadLetterUri="direct-vm:commonErrorEndpoint"/>
<redeliveryPolicyProfile id="noRedelivery" disableRedelivery="true"/>
<camelContext id="openapi-[=objectId]-context" xmlns="http://camel.apache.org/schema/blueprint">
<route id="[=objectId]-cxf-rs-endpoint" streamCache="true">
<from uri="cxfrs:bean:[=objectId]-rs-server?bindingStyle=SimpleConsumer"/>
<setHeader name="ENTAXY_EndpointName">
<simple>[=objectId]</simple>
</setHeader>
<setHeader name="NTX_ERROR_HANDLER_SYNC_TYPE">
<constant>application/json</constant>
</setHeader>
[#if properties.isValidate?? && properties.isValidate]
<to uri="bean-validator:validation"/>
[/#if]
[#if properties.resultType?? && properties.resultType == "ORIGIN"]
<marshal>
<json library="Jackson" autoDiscoverObjectMapper="true"/>
</marshal>
[/#if]
[#include "templates:service-components/generateLoggingKey.ftl"]
<to uri="direct:[=objectId]-operation-router" />
</route>
[#if properties.removeAllHeadersBeforeAnswering]
<removeHeaders pattern="*"/>
[/#if]
<removeProperties pattern="NTX.+|ENTAXY.+"/>
<removeHeaders pattern="NTX.+|ENTAXY.+"/>
</route>
</camelContext>

View File

@ -1,21 +1,20 @@
[#ftl attributes={"generated.type":"blueprint.fragment"}]
<route>
<operation-router-start />
<operation-router>
<entaxy:object-route xmlns="http://camel.apache.org/schema/blueprint" xmlns:blueprint="http://www.osgi.org/xmlns/blueprint/v1.0.0" xmlns:entaxy="http://www.entaxy.ru/schemas/1.0" xmlns:m="http://www.entaxy.ru/schemas/entaxy-mediators/1.0">
<m:operation-router>
[#if properties.service??]
[#if properties.service.operations??]
[#list properties.service.operations as path, operationData]
[#list operationData as verb, operationId]
<operation name="[=operationId]">
<!-- path: [=path]; verb: [=verb] -->
<log message="Called operation: ${headers.operationName}" loggingLevel="INFO"/>
</operation>
[#list operationData as verb, operation]
<m:operation name="[=operation.operationIdCamelCase]">
<!-- path: [=path]; verb: [=verb]; operationId: [=operation.original!"isn't set"]-->
<m:log message="Called operation: ${headers.operationName}" loggingLevel="INFO"/>
</m:operation>
[/#list]
[/#list]
<unknown-operation>
<log message="Unknown operation: ${headers.operationName}" loggingLevel="WARN"/>
</unknown-operation>
<m:unknown-operation>
<m:log message="Unknown operation: ${headers.operationName}" loggingLevel="WARN"/>
</m:unknown-operation>
[/#if]
[/#if]
</operation-router>
</route>
</m:operation-router>
</entaxy:object-route>

View File

@ -1,22 +1,22 @@
[#ftl attributes={"generated.type":"blueprint.fragment"}]
<route>
<operation-router-start />
<operation-router>
<?xml version="1.0" encoding="UTF-8"?>
<entaxy:object-route xmlns="http://camel.apache.org/schema/blueprint" xmlns:blueprint="http://www.osgi.org/xmlns/blueprint/v1.0.0" xmlns:entaxy="http://www.entaxy.ru/schemas/1.0" xmlns:m="http://www.entaxy.ru/schemas/entaxy-mediators/1.0">
<m:operation-router>
[#if properties.service??]
[#if properties.service.operations??]
[#list properties.service.operations as path, operationData]
[#list operationData as verb, operationId]
<operation name="[=operationId]">
<!-- path: [=path]; verb: [=verb] -->
<log message="Called operation: ${headers.operationName}" loggingLevel="INFO"/>
<connector direction="in" />
</operation>
[#list operationData as verb, operation]
<m:operation name="[=operation.operationIdCamelCase]">
<!-- path: [=path]; verb: [=verb]; operationId: [=operation.original!"isn't set"]-->
<m:log message="Called operation: ${headers.operationName}" loggingLevel="INFO"/>
<m:service-connector direction="in" />
</m:operation>
[/#list]
[/#list]
<unknown-operation>
<log message="Unknown operation: ${headers.operationName}" loggingLevel="WARN"/>
</unknown-operation>
<m:unknown-operation>
<m:log message="Unknown operation: ${headers.operationName}" loggingLevel="WARN"/>
</m:unknown-operation>
[/#if]
[/#if]
</operation-router>
</route>
</m:operation-router>
</entaxy:object-route>

View File

@ -1,21 +1,21 @@
[#ftl attributes={"generated.type":"blueprint.fragment"}]
<route>
<operation-router-start />
<operation-router>
<?xml version="1.0" encoding="UTF-8"?>
<entaxy:object-route xmlns="http://camel.apache.org/schema/blueprint" xmlns:blueprint="http://www.osgi.org/xmlns/blueprint/v1.0.0" xmlns:entaxy="http://www.entaxy.ru/schemas/1.0" xmlns:m="http://www.entaxy.ru/schemas/entaxy-mediators/1.0">
<m:operation-router>
[#if properties.service??]
[#if properties.service.operations??]
[#list properties.service.operations as path, operationData]
[#list operationData as verb, operationId]
<operation name="[=operationId]">
<!-- path: [=path]; verb: [=verb] -->
<log message="Called operation: ${headers.operationName}" loggingLevel="INFO"/>
</operation>
[#list operationData as verb, operation]
<m:operation name="[=operation.operationIdCamelCase]">
<!-- path: [=path]; verb: [=verb]; operationId: [=operation.original!"isn't set"]-->
<m:log message="Called operation: ${headers.operationName}" loggingLevel="INFO"/>
</m:operation>
[/#list]
[/#list]
<unknown-operation>
<log message="Unknown operation: ${headers.operationName}" loggingLevel="WARN"/>
</unknown-operation>
<m:unknown-operation>
<m:log message="Unknown operation: ${headers.operationName}" loggingLevel="WARN"/>
</m:unknown-operation>
[/#if]
[/#if]
</operation-router>
</route>
</m:operation-router>
</entaxy:object-route>

View File

@ -1,4 +1,5 @@
[#ftl attributes={"generated.type":"blueprint.fragment"}]
<?xml version="1.0" encoding="UTF-8"?>
<route>
<operation-router-start />
<operation-router>
@ -6,11 +7,11 @@
[#if properties.service.port??]
[#list properties.service.port.operations as operation]
<operation name="[=operation]">
<log message="Called operation: ${headers.operationName}" loggingLevel="INFO"/>
<m:log message="Called operation: ${headers.operationName}" loggingLevel="INFO"/>
</operation>
[/#list]
<unknown-operation>
<log message="Unknown operation: ${headers.operationName}" loggingLevel="WARN"/>
<m:log message="Unknown operation: ${headers.operationName}" loggingLevel="WARN"/>
</unknown-operation>
[/#if]
[/#if]

View File

@ -1,18 +1,17 @@
[#ftl attributes={"generated.type":"blueprint.fragment"}]
<route>
<from uri="direct:pre-route" />
<operation-router>
<entaxy:object-route xmlns="http://camel.apache.org/schema/blueprint" xmlns:blueprint="http://www.osgi.org/xmlns/blueprint/v1.0.0" xmlns:entaxy="http://www.entaxy.ru/schemas/1.0" xmlns:m="http://www.entaxy.ru/schemas/entaxy-mediators/1.0">
<m:operation-router>
[#if properties.service??]
[#if properties.service.port??]
[#list properties.service.port.operations as operation]
<operation name="[=operation]">
<log message="Called operation: ${headers.operationName}" loggingLevel="INFO"/>
</operation>
<m:operation name="[=operation]">
<m:log message="Called operation: ${headers.operationName}" loggingLevel="INFO"/>
</m:operation>
[/#list]
<unknown-operation>
<log message="Unknown operation: ${headers.operationName}" loggingLevel="WARN"/>
</unknown-operation>
<m:unknown-operation>
<m:log message="Unknown operation: ${headers.operationName}" loggingLevel="WARN"/>
</m:unknown-operation>
[/#if]
[/#if]
</operation-router>
</route>
</m:operation-router>
</entaxy:object-route>

View File

@ -1,19 +1,19 @@
[#ftl attributes={"generated.type":"blueprint.fragment"}]
<route>
<operation-router-start />
<operation-router>
<?xml version="1.0" encoding="UTF-8"?>
<entaxy:object-route xmlns="http://camel.apache.org/schema/blueprint" xmlns:blueprint="http://www.osgi.org/xmlns/blueprint/v1.0.0" xmlns:entaxy="http://www.entaxy.ru/schemas/1.0" xmlns:m="http://www.entaxy.ru/schemas/entaxy-mediators/1.0">
<m:operation-router>
[#if properties.service??]
[#if properties.service.port??]
[#list properties.service.port.operations as operation]
<operation name="[=operation]">
<log message="Called operation: ${headers.operationName}" loggingLevel="INFO"/>
<connector direction="in" />
</operation>
<m:operation name="[=operation]">
<m:log message="Called operation: ${headers.operationName}" loggingLevel="INFO"/>
<m:service-connector direction="in" />
</m:operation>
[/#list]
<unknown-operation>
<log message="Unknown operation: ${headers.operationName}" loggingLevel="WARN"/>
</unknown-operation>
<m:unknown-operation>
<m:log message="Unknown operation: ${headers.operationName}" loggingLevel="WARN"/>
</m:unknown-operation>
[/#if]
[/#if]
</operation-router>
</route>
</m:operation-router>
</entaxy:object-route>

View File

@ -1,18 +1,18 @@
[#ftl attributes={"generated.type":"blueprint.fragment"}]
<route>
<operation-router-start />
<operation-router>
<?xml version="1.0" encoding="UTF-8"?>
<entaxy:object-route xmlns="http://camel.apache.org/schema/blueprint" xmlns:blueprint="http://www.osgi.org/xmlns/blueprint/v1.0.0" xmlns:entaxy="http://www.entaxy.ru/schemas/1.0" xmlns:m="http://www.entaxy.ru/schemas/entaxy-mediators/1.0">
<m:operation-router>
[#if properties.service??]
[#if properties.service.port??]
[#list properties.service.port.operations as operation]
<operation name="[=operation]">
<log message="Called operation: ${headers.operationName}" loggingLevel="INFO"/>
</operation>
<m:operation name="[=operation]">
<m:log message="Called operation: ${headers.operationName}" loggingLevel="INFO"/>
</m:operation>
[/#list]
<unknown-operation>
<log message="Unknown operation: ${headers.operationName}" loggingLevel="WARN"/>
</unknown-operation>
<m:unknown-operation>
<m:log message="Unknown operation: ${headers.operationName}" loggingLevel="WARN"/>
</m:unknown-operation>
[/#if]
[/#if]
</operation-router>
</route>
</m:operation-router>
</entaxy:object-route>

View File

@ -38,6 +38,7 @@
<ref component-id="authInterceptor"/>
<ref component-id="systemInterceptor"/>
<ref component-id="validator"/>
<ref component-id="resolveLoginInterceptor"/>
</camelcxf:inInterceptors>
<camelcxf:outFaultInterceptors>
<ref component-id="handleOutFaultInterceptor"/>
@ -52,7 +53,7 @@
<bean id="handleOutFaultInterceptor"
class="ru.entaxy.esb.system.core.common.error.handler.interceptor.HandleOutFaultInterceptor">
<argument ref="uniform-service-passive-connector-context"/>
<argument ref="soap-[=objectId]-context"/>
<argument value="direct:error_from_cxf"/>
</bean>
@ -63,6 +64,7 @@
filter="(type=system)"/>
<reference id="authInterceptor" interface="org.apache.cxf.phase.PhaseInterceptor"
filter="(type=authentication)"/>
<bean id="resolveLoginInterceptor" class="ru.entaxy.platform.services.runtime.interceptor.ResolveLoginInterceptor" />
<bean id="[=objectId]-connector-registry" class="ru.entaxy.platform.services.runtime.impl.EntaxyServiceConnectorRegistry" activation="eager">
<property name="profileNameHeaders">
@ -79,7 +81,7 @@
bind-method="register" unbind-method="unregister"/>
</reference-list>
<camelContext id="uniform-service-passive-connector-context" xmlns="http://camel.apache.org/schema/blueprint"
<camelContext id="soap-[=objectId]-context" xmlns="http://camel.apache.org/schema/blueprint"
errorHandlerRef="commonErrorHandler">
<errorHandler id="commonErrorHandler" redeliveryPolicyRef="noRedelivery"
@ -98,6 +100,9 @@
<setHeader name="ENTAXY_EndpointName">
<simple>[=objectId]</simple>
</setHeader>
[#include "templates:service-components/generateLoggingKey.ftl"]
<to uri="direct:[=objectId]-operation-router" />
</route>

View File

@ -2,6 +2,7 @@
{
"factory": {
"id": "[=properties.serviceId]-soap-connector-in",
"displayName": "SERVICE :: SOAP :: [=properties.serviceId] :: IN",
"type": "entaxy.runtime.connector",
"description": "Factory abstract-service-soap-connector-in of entaxy.runtime.connector",
"parent": "abstract-service-soap-connector-in",
@ -20,7 +21,7 @@
"@INHERIT": {
"preprocess": "append"
},
"preprocess":[
"_preprocess":[
{
"processor": "xslt",
"source":"entaxy-file-internal:routes-common/soap-operation-router.xslt",
@ -34,6 +35,14 @@
}
}
],
"postprocess": [
{
"processor": "component-library",
"parameters": {
"serviceType": "[=properties.serviceType]"
}
}
]
},

View File

@ -21,8 +21,15 @@
[/#list]
-->
[#assign finalAddress=properties.address]
[#if !finalAddress?starts_with('http://') && !finalAddress?starts_with('https://')]
[#if !finalAddress?starts_with('/')]
[#assign finalAddress='/'+properties.address]
[/#if]
[/#if]
<camelcxf:cxfEndpoint id="[=objectId]-cxf-endpoint"
address="/[=properties.address]"
address="[=finalAddress]"
endpointName="[=objectId]:[=properties.port]"
serviceName="[=objectId]:[=properties.serviceName]"
wsdlURL="entaxy-resource://[=properties.schemaUrl?replace(":", "/")]">
@ -32,12 +39,21 @@
<entry key="schema-validation-enabled" value="[=properties.schemaValidationEnabled?c]"/>
</camelcxf:properties>
<camelcxf:inInterceptors>
[#if properties.enableAuthorization]
[#if properties.authorizationType == "JAAS"]
<ref component-id="jaasLoginInterceptor" />
[#if properties.restrictByRoles]
<ref component-id="simpleAuthorizingInterceptor" />
[/#if]
<ref component-id="resolveProfileNameInterceptor" />
<ref component-id="resolveLoginInterceptor"/>
[#if properties.displayServiceSchema]
<ref component-id="isSchemaDisplayInterceptor"/>
<!-- ref component-id="isSchemaDisplayInterceptor" / -->
[#else]
<ref component-id="disableWSDLGetInterceptor" />
<ref component-id="postAuthWsdlGetInterceptor" />
[/#if]
<ref component-id="authInterceptor"/>
<ref component-id="systemInterceptor"/>
<!-- ref component-id="authInterceptor"/>
<ref component-id="systemInterceptor"/ -->
[/#if]
<ref component-id="validator"/>
</camelcxf:inInterceptors>
@ -48,36 +64,61 @@
<bean id="handleOutFaultInterceptor"
class="ru.entaxy.esb.system.core.common.error.handler.interceptor.HandleOutFaultInterceptor">
<argument ref="uniform-service-passive-connector-context"/>
<argument ref="soap-[=objectId]-context"/>
<argument value="direct:error_from_cxf"/>
</bean>
<bean id="validator" class="ru.entaxy.esb.system.common.validator.ValidateInterceptor">
<bean id="validator" class="ru.entaxy.platform.services.runtime.interceptor.SOAPValidateInterceptor">
<property name="schemaValidationEnabled" value="[=properties.schemaValidationEnabled?c]"/>
</bean>
[#if properties.enableAuthorization]
<reference id="systemInterceptor" interface="org.apache.cxf.phase.PhaseInterceptor"
[#if properties.authorizationType == "JAAS"]
<bean id="jaasLoginInterceptor" class="org.apache.cxf.interceptor.security.JAASLoginInterceptor">
<property name="contextName" value="[=properties.authorizationRealm]" />
<property name="roleClassifier" value="RolePrincipal"/>
<property name="roleClassifierType" value="classname"/>
<property name="allowAnonymous" value="false"/>
<property name="allowNamedPrincipals" value="true"/>
</bean>
<bean id="resolveProfileNameInterceptor" class="ru.entaxy.platform.services.runtime.interceptor.ResolveProfileNameInterceptor">
</bean>
<bean id="resolveLoginInterceptor" class="ru.entaxy.platform.services.runtime.interceptor.ResolveLoginInterceptor" />
[#if properties.restrictByRoles]
<bean id="simpleAuthorizingInterceptor" class="org.apache.cxf.interceptor.security.SimpleAuthorizingInterceptor">
<property name="methodRolesMap">
<map>
<!-- NOT IMPLEMENTED YET -->
<!-- no wildcard support, names need to match exactly -->
<!-- entry key="addNumbers" value="ROLE_USER ROLE_ADMIN"/>
<entry key="divideNumbers" value="ROLE_ADMIN"/ -->
</map>
</property>
<!-- its possible to define global roles that apply to all WSDL operations not listed above -->
<property name="globalRoles" value="[=properties.globalRoles]"/>
</bean>
[/#if]
<!-- reference id="systemInterceptor" interface="org.apache.cxf.phase.PhaseInterceptor"
filter="(type=system)"/>
<reference id="authInterceptor" interface="org.apache.cxf.phase.PhaseInterceptor"
filter="(type=authentication)"/>
filter="(type=authentication)"/ -->
[#if properties.displayServiceSchema]
<bean id="isSchemaDisplayInterceptor" class="ru.entaxy.platform.services.runtime.interceptor.IsSchemaDisplayInterceptor">
<!-- bean id="isSchemaDisplayInterceptor" class="ru.entaxy.platform.services.runtime.interceptor.IsSchemaDisplayInterceptor">
<property name="isDisplayServiceSchema" value="[=displayServiceSchema?c]"/>
</bean>
</bean -->
[#else]
<bean id="postAuthWsdlGetInterceptor" class="ru.entaxy.platform.services.runtime.interceptor.PostAuthWSDLGetInterceptor">
</bean>
<bean id="disableWSDLGetInterceptor" class="ru.entaxy.platform.services.runtime.interceptor.DisableWSDLGetInterceptor">
</bean>
[/#if]
[/#if]
<camelContext id="uniform-service-passive-connector-context" xmlns="http://camel.apache.org/schema/blueprint"
errorHandlerRef="commonErrorHandler">
<errorHandler id="commonErrorHandler" redeliveryPolicyRef="noRedelivery"
type="DeadLetterChannel" deadLetterUri="direct-vm:commonErrorEndpoint"/>
<redeliveryPolicyProfile id="noRedelivery" disableRedelivery="true"/>
<camelContext id="soap-[=objectId]-context" xmlns="http://camel.apache.org/schema/blueprint">
<route id="error_from_cxf">
<from uri="direct:error_from_cxf"/>
<log message="cxf message: ${body}" loggingLevel="DEBUG"/>
<log message="headers: ${headers}\n" loggingLevel="DEBUG"/>
<log message="${headers.NTX_loggingKey} cxf message: ${body}" loggingLevel="DEBUG"/>
<log message="${headers.NTX_loggingKey} headers: ${headers}\n" loggingLevel="DEBUG"/>
<to uri="direct-vm:cxfErrorEndpoint"/>
</route>
@ -86,7 +127,16 @@
<setHeader name="ENTAXY_EndpointName">
<simple>[=objectId]</simple>
</setHeader>
[#include "templates:service-components/generateLoggingKey.ftl"]
<to uri="direct:[=objectId]-operation-router" />
[#if properties.removeAllHeadersBeforeAnswering]
<removeHeaders pattern="*"/>
[/#if]
<removeProperties pattern="NTX.+|ENTAXY.+"/>
<removeHeaders pattern="NTX.+|ENTAXY.+"/>
</route>
</camelContext>

View File

@ -3,7 +3,7 @@
<parent>
<groupId>ru.entaxy.esb.platform.runtime.core.objects-implementations</groupId>
<artifactId>service-implementation</artifactId>
<version>1.9.0</version>
<version>1.10.0</version>
</parent>
<groupId>ru.entaxy.esb.platform.runtime.core.objects-implementations.service-implementation</groupId>
<artifactId>service-runtime</artifactId>
@ -16,12 +16,28 @@
ru.entaxy.platform.services.runtime,
ru.entaxy.platform.services.runtime.exceptions,
ru.entaxy.platform.services.runtime.impl,
ru.entaxy.platform.services.runtime.interceptor
ru.entaxy.platform.services.runtime.interceptor,
ru.entaxy.platform.services.runtime.utils
</bundle.osgi.export.pkg>
<bundle.osgi.import.pkg>
javax.xml.soap*;version="[1.3,2)",
*
</bundle.osgi.import.pkg>
</properties>
<dependencies>
<dependency>
<dependency>
<groupId>xerces</groupId>
<artifactId>xercesImpl</artifactId>
<version>${xerces.version}</version>
<exclusions>
<exclusion>
<groupId>xml-apis</groupId>
<artifactId>xml-apis</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-core-engine</artifactId>
<version>${camel.version}</version>
@ -31,6 +47,11 @@
<artifactId>resources-service</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>ru.entaxy.esb.platform.runtime.core</groupId>
<artifactId>core-support-runtime</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>javax.interceptor</groupId>
<artifactId>javax.interceptor-api</artifactId>
@ -57,10 +78,9 @@
<version>${cxf.version}</version>
</dependency>
<dependency>
<groupId>ru.entaxy.esb.system.commons</groupId>
<artifactId>system-commons</artifactId>
<version>${project.version}</version>
<scope>provided</scope>
<groupId>org.apache.karaf.jaas</groupId>
<artifactId>org.apache.karaf.jaas.boot</artifactId>
<version>${karaf.version}</version>
</dependency>
</dependencies>

View File

@ -2,7 +2,7 @@
* ~~~~~~licensing~~~~~~
* service-runtime
* ==========
* Copyright (C) 2020 - 2023 EmDev LLC
* Copyright (C) 2020 - 2024 EmDev LLC
* ==========
* You may not use this file except in accordance with the License Terms of the Copyright
* Holder located at: https://entaxy.ru/eula . All copyrights, all intellectual property

View File

@ -2,7 +2,7 @@
* ~~~~~~licensing~~~~~~
* system-commons
* ==========
* Copyright (C) 2020 - 2023 EmDev LLC
* Copyright (C) 2020 - 2024 EmDev LLC
* ==========
* You may not use this file except in accordance with the License Terms of the Copyright
* Holder located at: https://entaxy.ru/eula . All copyrights, all intellectual property

View File

@ -2,7 +2,7 @@
* ~~~~~~licensing~~~~~~
* service-runtime
* ==========
* Copyright (C) 2020 - 2023 EmDev LLC
* Copyright (C) 2020 - 2024 EmDev LLC
* ==========
* You may not use this file except in accordance with the License Terms of the Copyright
* Holder located at: https://entaxy.ru/eula . All copyrights, all intellectual property

View File

@ -2,7 +2,7 @@
* ~~~~~~licensing~~~~~~
* service-runtime
* ==========
* Copyright (C) 2020 - 2023 EmDev LLC
* Copyright (C) 2020 - 2024 EmDev LLC
* ==========
* You may not use this file except in accordance with the License Terms of the Copyright
* Holder located at: https://entaxy.ru/eula . All copyrights, all intellectual property
@ -55,6 +55,17 @@ public class EntaxyServiceConnectorRegistry extends CommonNamedReferenceListener
exchange.getIn().setHeader("NTX_targetConnector", connectorInfo.getEndpoint());
}
public void outConnectorFind(Exchange exchange) {
String profileName = getProfileNameFromExchange(exchange);
if (!CommonUtils.isValid(profileName))
return;
String key = "out-" + profileName;
if (!isRegistered(key))
return;
EntaxyServiceConnectorInfo connectorInfo = getReference(key);
exchange.getIn().setHeader("NTX_targetConnector", connectorInfo.getEndpoint());
}
protected String getProfileNameFromExchange(Exchange exchange) {
String result = null;
Map<String, Object> headers = exchange.getIn().getHeaders();

View File

@ -2,7 +2,7 @@
* ~~~~~~licensing~~~~~~
* service-runtime
* ==========
* Copyright (C) 2020 - 2023 EmDev LLC
* Copyright (C) 2020 - 2024 EmDev LLC
* ==========
* You may not use this file except in accordance with the License Terms of the Copyright
* Holder located at: https://entaxy.ru/eula . All copyrights, all intellectual property
@ -25,19 +25,25 @@
*/
package ru.entaxy.platform.services.runtime.interceptor;
import java.net.URL;
import java.security.Principal;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.Map;
import java.util.regex.Pattern;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.apache.cxf.interceptor.Fault;
import org.apache.cxf.message.Message;
import org.apache.cxf.phase.AbstractPhaseInterceptor;
import org.apache.cxf.phase.Phase;
import org.apache.cxf.security.SecurityContext;
import org.apache.cxf.transport.http.Headers;
import ru.entaxy.esb.system.common.util.SystemHeadersConstants;
import java.net.URL;
import java.util.*;
import java.util.regex.Pattern;
import org.apache.karaf.jaas.boot.principal.UserPrincipal;
@Deprecated(since = "1.10", forRemoval = true)
public class IsSchemaDisplayInterceptor extends AbstractPhaseInterceptor<Message> {
private static final Log LOG = LogFactory.getLog(IsSchemaDisplayInterceptor.class);
@ -51,7 +57,7 @@ public class IsSchemaDisplayInterceptor extends AbstractPhaseInterceptor<Message
SERVICE_SCHEMA_QUERY.add("swagger.json");
SERVICE_SCHEMA_QUERY.add("open-api.json");
SERVICE_SCHEMA_QUERY.add("open-api.yaml");
SERVICE_SCHEMA_FILE.add(".*\\/openapi\\.json");
SERVICE_SCHEMA_FILE.add(".*\\/openapi\\.yaml");
SERVICE_SCHEMA_FILE.add(".*api-docs");
@ -68,32 +74,40 @@ public class IsSchemaDisplayInterceptor extends AbstractPhaseInterceptor<Message
public void handleMessage(Message message) throws Fault {
Map<String, List<String>> headers = Headers.getSetProtocolHeaders(message);
headers.put(SystemHeadersConstants.HEADER_IS_DISPLAY_SERVICE_SERVICE, Collections.singletonList(String.valueOf(checkOnSchema(message))));
boolean isAllowedSchemaRequest = checkOnSchema(message);
if (isAllowedSchemaRequest) {
// we create simple SecurityContext with anonymous user
message.put(SecurityContext.class, new AnonymousSecurityContext());
}
headers.put(SystemHeadersConstants.HEADER_IS_DISPLAY_SERVICE_SERVICE,
Collections.singletonList(String.valueOf(isAllowedSchemaRequest)));
}
private boolean checkOnSchema(Message message) {
if (!isDisplayServiceSchema)
return false;
if (!isDisplayServiceSchema)
return false;
Object params = message.get(Message.QUERY_STRING);
for (String schema : SERVICE_SCHEMA_QUERY) {
if (params != null && Pattern.matches(schema, params.toString()))
return true;
}
params = message.get(Message.REQUEST_URL);
try {
URL requestUrl = new URL(params.toString());
for (String schema : SERVICE_SCHEMA_FILE) {
if (Pattern.matches(schema, requestUrl.getFile()))
return true;
}
URL requestUrl = new URL(params.toString());
for (String schema : SERVICE_SCHEMA_FILE) {
if (Pattern.matches(schema, requestUrl.getFile()))
return true;
}
} catch (Exception e) {
}
return false;
}
@ -104,4 +118,22 @@ public class IsSchemaDisplayInterceptor extends AbstractPhaseInterceptor<Message
public void setIsDisplayServiceSchema(boolean displayServiceSchema) {
this.isDisplayServiceSchema = displayServiceSchema;
}
protected static class AnonymousSecurityContext implements SecurityContext {
public static final String ANONYMOUS_USER_NAME = "anonymous";
protected static Principal ANONYMOUS_USER = new UserPrincipal(ANONYMOUS_USER_NAME);
@Override
public Principal getUserPrincipal() {
return ANONYMOUS_USER;
}
@Override
public boolean isUserInRole(String role) {
return false;
}
}
}

View File

@ -3,7 +3,7 @@
~~~~~~licensing~~~~~~
service-runtime
==========
Copyright (C) 2020 - 2023 EmDev LLC
Copyright (C) 2020 - 2024 EmDev LLC
==========
You may not use this file except in accordance with the License Terms of the Copyright
Holder located at: https://entaxy.ru/eula . All copyrights, all intellectual property