From 5bb12cf6b4ec84d6cccfad14788335d825a223c8 Mon Sep 17 00:00:00 2001 From: ThilinaManamgoda Date: Wed, 4 Apr 2018 22:55:22 +0530 Subject: [PATCH 1/4] 2.2.0 configurations --- .../datasources/analytics-datasources.xml | 10 +- .../apim/repository/conf/api-manager.xml | 98 +--- .../apim/repository/conf/axis2/axis2.xml | 36 +- .../apim/repository/conf/carbon.xml | 14 +- .../apim/repository/conf/log4j.properties | 220 ------- .../apim/repository/conf/registry.xml | 19 +- .../apim/repository/conf/user-mgt.xml | 13 +- .../jaggeryapps/portal/configs/designer.json | 124 ++-- .../docker-compose.yml | 37 +- .../repository/conf/consent-mgt-config.xml | 42 ++ .../repository/conf/identity/identity.xml | 542 ++++++++++++++---- .../is-as-km/repository/conf/user-mgt.xml | 13 +- .../mysql/scripts/apim_mysql5.7.sql | 412 ++++++++++--- .../mysql/scripts/carbon_mysql5.7.sql | 13 + dockerfiles/apim-analytics/Dockerfile | 2 +- dockerfiles/apim-analytics/README.md | 16 +- dockerfiles/apim/Dockerfile | 2 +- dockerfiles/apim/README.md | 16 +- dockerfiles/is-as-km/Dockerfile | 2 +- dockerfiles/is-as-km/README.md | 14 +- dockerfiles/microgateway/Dockerfile | 66 +++ dockerfiles/microgateway/README.md | 79 +++ 22 files changed, 1162 insertions(+), 628 deletions(-) delete mode 100644 docker-compose/APIM-ISasKM-with-Analytics/apim/repository/conf/log4j.properties create mode 100644 docker-compose/APIM-ISasKM-with-Analytics/is-as-km/repository/conf/consent-mgt-config.xml create mode 100644 dockerfiles/microgateway/Dockerfile create mode 100644 dockerfiles/microgateway/README.md diff --git a/docker-compose/APIM-ISasKM-with-Analytics/apim-analytics/repository/conf/datasources/analytics-datasources.xml b/docker-compose/APIM-ISasKM-with-Analytics/apim-analytics/repository/conf/datasources/analytics-datasources.xml index 381dabca..57d01b07 100755 --- a/docker-compose/APIM-ISasKM-with-Analytics/apim-analytics/repository/conf/datasources/analytics-datasources.xml +++ b/docker-compose/APIM-ISasKM-with-Analytics/apim-analytics/repository/conf/datasources/analytics-datasources.xml @@ -19,10 +19,11 @@ com.mysql.jdbc.Driver 50 60000 - true SELECT 1 - 30000 false + 0 + true + 4000 READ_COMMITTED @@ -39,10 +40,11 @@ com.mysql.jdbc.Driver 50 60000 - true SELECT 1 - 30000 false + 0 + true + 4000 READ_COMMITTED diff --git a/docker-compose/APIM-ISasKM-with-Analytics/apim/repository/conf/api-manager.xml b/docker-compose/APIM-ISasKM-with-Analytics/apim/repository/conf/api-manager.xml index c7296e75..674a7358 100755 --- a/docker-compose/APIM-ISasKM-with-Analytics/apim/repository/conf/api-manager.xml +++ b/docker-compose/APIM-ISasKM-with-Analytics/apim/repository/conf/api-manager.xml @@ -56,8 +56,6 @@ Token generation the implementation is provided in URLSafeJWTGenerator --> - - false + + true + + true @@ -190,7 +197,7 @@ org.wso2.analytics.apim.alertStakeholderInfo - 1.0.0 + 1.0.1 @@ -216,7 +223,7 @@ -If you need to start two API Manager instances in the same machine, you need to give different ports to "ThriftServerPort" value in two nodes. -ThriftServerHost - Allows to configure a hostname for the thrift server. It uses the carbon hostname by default. -The Gateway uses this parameter to connect to the key validation thrift service. --> - WSClient + ThriftClient 10000 @@ -249,6 +256,8 @@ + + am_application_scope + false true @@ -317,7 +327,7 @@ false - https://localhost/publisher + https://localhost:${mgt.transport.https.port}/publisher + + true - - - - false - - - - - /resource - admin - 1.0.0 - none - none - Any - - - - - - - @@ -571,13 +543,15 @@ true - - true + Binary tcp://${carbon.local.ip}:${receiver.url.port} ssl://${carbon.local.ip}:${auth.url.port} ${admin.username} ${admin.password} + + + true 1000 200 @@ -589,6 +563,7 @@ + true https://localhost:${mgt.transport.https.port}${carbon.context}services/ ${admin.username} ${admin.password} @@ -600,32 +575,16 @@ true - tcp://${carbon.local.ip}:${jms.port} - ${admin.username} - ${admin.password} throttleData TopicConnectionFactory topic org.wso2.andes.jndi.PropertiesFileInitialContextFactory - amqp://${jms.username}:${jms.password}@clientid/carbon?brokerlist='${jms.url}' + amqp://${admin.username}:${admin.password}@clientid/carbon?brokerlist='tcp://${carbon.local.ip}:${jms.port}' - - 20 - 100 - 1000 - 10 - - - org.wso2.andes.jndi.PropertiesFileInitialContextFactory - repository/conf/jndi.properties - topic - throttleData - allow - TopicConnectionFactory - + + Supported Languages/Frameworks : android, java, scala, csharp, dart, flash, groovy, javascript, jmeter, + nodejs, perl, php, python, ruby, swift, clojure, asyncScala, csharpDotNet2--> java,android diff --git a/docker-compose/APIM-ISasKM-with-Analytics/apim/repository/conf/axis2/axis2.xml b/docker-compose/APIM-ISasKM-with-Analytics/apim/repository/conf/axis2/axis2.xml index 6aa4d146..4cbe17c0 100644 --- a/docker-compose/APIM-ISasKM-with-Analytics/apim/repository/conf/axis2/axis2.xml +++ b/docker-compose/APIM-ISasKM-with-Analytics/apim/repository/conf/axis2/axis2.xml @@ -168,14 +168,16 @@ class="org.apache.axis2.format.PlainTextFormatter"/> - + + class="org.apache.synapse.commons.json.JsonFormatter"/--> + - + + class="org.apache.synapse.commons.json.JsonBuilder"/--> + + @@ -543,7 +548,15 @@ wso2carbon - AllowAll> + + + + + + repository/resources/security/sslprofiles.xml + 600000 + + @@ -601,6 +614,15 @@ outflowFaultSeq + + outflowDispatchSeq + outflowFaultSeq + + repository/resources/security/client-truststore.jks + wso2carbon + + + diff --git a/docker-compose/APIM-ISasKM-with-Analytics/apim/repository/conf/carbon.xml b/docker-compose/APIM-ISasKM-with-Analytics/apim/repository/conf/carbon.xml index 2e369a33..f0f9ba3a 100755 --- a/docker-compose/APIM-ISasKM-with-Analytics/apim/repository/conf/carbon.xml +++ b/docker-compose/APIM-ISasKM-with-Analytics/apim/repository/conf/carbon.xml @@ -1,6 +1,6 @@ - 2.1.0 + 2.2.0 - - - - - application/vnd.wso2-api+xml - - + + + application/vnd.wso2-api+xml + + @@ -243,6 +243,13 @@ + + + true + 35 3 @@ -298,6 +306,7 @@ + + + + + + jdbc/CarbonDB + + + change-me + change-me + change-me + change-me + false + change-me +
+ change-me + change-me + change-me + change-me + change-me + change-me +
+
+ + 100 + +
\ No newline at end of file diff --git a/docker-compose/APIM-ISasKM-with-Analytics/is-as-km/repository/conf/identity/identity.xml b/docker-compose/APIM-ISasKM-with-Analytics/is-as-km/repository/conf/identity/identity.xml index b5b51535..7c789552 100644 --- a/docker-compose/APIM-ISasKM-with-Analytics/is-as-km/repository/conf/identity/identity.xml +++ b/docker-compose/APIM-ISasKM-with-Analytics/is-as-km/repository/conf/identity/identity.xml @@ -1,4 +1,4 @@ - + + + + + 50000 true - 720 + 15 20160 + @@ -52,16 +58,18 @@ SunX509 SunX509 + SelfAndManaged CertValidate - - + + - - + + + + + + + + - -1 - -1 - -1 - -1 + + + + + + + + + + + + - ${carbon.protocol}://${carbon.host}:${carbon.management.port}/identity/connect/register + ${carbon.protocol}://${carbon.host}:${carbon.management.port}/api/identity/oauth2/dcr/v1.0/register ${carbon.protocol}://${carbon.host}:${carbon.management.port}/oauth2/jwks ${carbon.protocol}://${carbon.host}:${carbon.management.port}/oauth2/oidcdiscovery + 300 @@ -147,19 +184,13 @@ 84600 - 300 - - false + 0 true org.wso2.carbon.identity.oauth.tokenprocessor.PlainTextPersistenceProcessor - - - - false - - + + false @@ -196,6 +227,8 @@ client_credentials org.wso2.carbon.apimgt.keymgt.handlers.ExtendedClientCredentialsGrantHandler + false + false urn:ietf:params:oauth:grant-type:saml2-bearer @@ -203,21 +236,73 @@ iwa:ntlm - org.wso2.carbon.identity.oauth.common.NTLMAuthenticationValidator - org.wso2.carbon.identity.oauth2.token.handlers.grant.iwa.ntlm.NTLMAuthenticationGrantHandlerWithHandshake + org.wso2.carbon.identity.oauth2.token.handlers.grant.iwa.ntlm.NTLMAuthenticationGrantHandler + + + urn:ietf:params:oauth:grant-type:jwt-bearer + org.wso2.carbon.identity.oauth2.grant.jwt.JWTBearerGrantHandler + org.wso2.carbon.identity.oauth2.grant.jwt.JWTGrantValidator + + + + + authorization_code + + + implicit + + + - + + + + + + + + + + + + + + false + + + + + - - - + false org.wso2.carbon.identity.oauth2.authcontext.JWTTokenGenerator @@ -238,16 +321,46 @@ SHA256withRSA 15 + + + + FEDERATED + + org.wso2.carbon.identity.openidconnect.DefaultIDTokenBuilder SHA256withRSA + + + RSA-OAEP + + A128GCM + + + + RSA1_5 + RSA-OAEP + + + A128GCM + A192GCM + A256GCM + A128CBC-HS256 + A128CBC+HS256 + + + true + + false + + 120 + + + + + request_param_value_builder + org.wso2.carbon.identity.openidconnect.RequestParamRequestObjectBuilder + + + + + org.wso2.carbon.identity.openidconnect.RequestObjectValidatorImpl + + + + true + 0 + 5 + + @@ -275,9 +421,8 @@ + - 157680000 - 157680000 ${carbon.host} + 5 false http://www.w3.org/2000/09/xmldsig#rsa-sha1 http://www.w3.org/2000/09/xmldsig#sha1 + http://www.w3.org/2001/04/xmlenc#aes256-cbc + http://www.w3.org/2001/04/xmlenc#rsa-oaep-mgf1p true + + + + false + + ${carbon.protocol}://${carbon.host}:${carbon.management.port}/services/wso2carbon-sts + + + + + + + + + + + + + true + + true + true + + + true + + - - - - - + + + + + + + org.wso2.carbon.identity.governance.store.JDBCIdentityDataStore - - - + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + - - - - + + + + + + /permission/admin/manage/identity/usermgt/view + + + /permission/admin/manage/identity/usermgt/view + + + + + + + /permission/admin/manage/identity/consentmgt/add + + + + /permission/admin/manage/identity/consentmgt/delete + + + + /permission/admin/manage/identity/consentmgt/add + + + + /permission/admin/manage/identity/consentmgt/delete + + + + /permission/admin/manage/identity/consentmgt/add + + + + /permission/admin/manage/identity/consentmgt/delete + + + + + + /permission/admin/manage/identity/applicationmgt/create + + /permission/admin/manage/identity/applicationmgt/delete - + + /permission/admin/manage/identity/applicationmgt/update + + + /permission/admin/manage/identity/applicationmgt/view + + + /permission/admin/manage/identity/applicationmgt/delete + + /permission/admin/manage/identity/applicationmgt/create - + /permission/admin/manage/identity/applicationmgt/view - + /permission/admin/manage/identity/pep + + /permission/admin/manage/identity/usermgt/create + + + /permission/admin/manage/identity/usermgt/list + + + /permission/admin/manage/identity/rolemgt/create + + + /permission/admin/manage/identity/rolemgt/view + + + /permission/admin/manage/identity/usermgt/view + + + /permission/admin/manage/identity/usermgt/update + + + /permission/admin/manage/identity/usermgt/update + + + /permission/admin/manage/identity/usermgt/delete + + + /permission/admin/manage/identity/rolemgt/view + + + /permission/admin/manage/identity/rolemgt/update + + + /permission/admin/manage/identity/rolemgt/update + + + /permission/admin/manage/identity/rolemgt/delete + + + /permission/admin/login + + + /permission/admin/manage/identity/usermgt/delete + + + /permission/admin/login + + + /permission/admin/login + + + /permission/admin/manage/identity/usermgt/create + + + + + + + + + /permission/admin/manage/identity/usermgt + + + /permission/admin/manage/identity/applicationmgt + + - + + - /api/identity/user/v0.9 - /api/identity/recovery/v0.9 - /oauth2 - /api/identity/entitlement + /api/identity/user/v1.0/ + /api/identity/consent-mgt/v1.0/ + /api/identity/recovery/v0.9/ + /oauth2/ + /scim2/ + /api/identity/entitlement/ + /api/identity/oauth2/dcr/v1.0/ /identity/(.*) + 300 + diff --git a/docker-compose/APIM-ISasKM-with-Analytics/is-as-km/repository/conf/user-mgt.xml b/docker-compose/APIM-ISasKM-with-Analytics/is-as-km/repository/conf/user-mgt.xml index 5d4feacf..9a6f0575 100644 --- a/docker-compose/APIM-ISasKM-with-Analytics/is-as-km/repository/conf/user-mgt.xml +++ b/docker-compose/APIM-ISasKM-with-Analytics/is-as-km/repository/conf/user-mgt.xml @@ -85,9 +85,9 @@ (objectClass=groupOfNames) member false - [a-zA-Z0-9._-|//]{3,30}$ + [a-zA-Z0-9._\-|//]{3,30}$ ^[\S]{5,30}$ - [a-zA-Z0-9._-|//]{3,30}$ + [a-zA-Z0-9._\-|//]{3,30}$ false PLAIN_TEXT , @@ -134,13 +134,13 @@ memberOf true follow - [a-zA-Z0-9._-|//]{3,30}$ + [a-zA-Z0-9._\-|//]{3,30}$ ^[\S]{3,30}$ Username pattern policy violated ^[\S]{5,30}$ ^[\S]{5,30}$ Password length should be within 5 to 30 characters - [a-zA-Z0-9._-|//]{3,30}$ + [a-zA-Z0-9._\-|//]{3,30}$ ^[\S]{3,30}$ false false @@ -151,6 +151,7 @@ 512 100 100 + 1500 false WSO2.ORG true @@ -188,13 +189,13 @@ (objectClass=groupOfNames) member false - [a-zA-Z0-9._-|//]{3,30}$ + [a-zA-Z0-9._\-|//]{3,30}$ ^[\S]{3,30}$ Username pattern policy violated ^[\S]{5,30}$ ^[\S]{5,30}$ Password length should be within 5 to 30 characters - [a-zA-Z0-9._-|//]{3,30}$ + [a-zA-Z0-9._\-|//]{3,30}$ ^[\S]{3,30}$ true false diff --git a/docker-compose/APIM-ISasKM-with-Analytics/mysql/scripts/apim_mysql5.7.sql b/docker-compose/APIM-ISasKM-with-Analytics/mysql/scripts/apim_mysql5.7.sql index 7909e549..c6b4bf44 100644 --- a/docker-compose/APIM-ISasKM-with-Analytics/mysql/scripts/apim_mysql5.7.sql +++ b/docker-compose/APIM-ISasKM-with-Analytics/mysql/scripts/apim_mysql5.7.sql @@ -16,7 +16,7 @@ INSERT INTO IDN_BASE_TABLE values ('WSO2 Identity Server'); CREATE TABLE IF NOT EXISTS IDN_OAUTH_CONSUMER_APPS ( ID INTEGER NOT NULL AUTO_INCREMENT, CONSUMER_KEY VARCHAR(255), - CONSUMER_SECRET VARCHAR(512), + CONSUMER_SECRET VARCHAR(2048), USERNAME VARCHAR(255), TENANT_ID INTEGER DEFAULT 0, USER_DOMAIN VARCHAR(50), @@ -27,10 +27,20 @@ CREATE TABLE IF NOT EXISTS IDN_OAUTH_CONSUMER_APPS ( PKCE_MANDATORY CHAR(1) DEFAULT '0', PKCE_SUPPORT_PLAIN CHAR(1) DEFAULT '0', APP_STATE VARCHAR (25) DEFAULT 'ACTIVE', + USER_ACCESS_TOKEN_EXPIRE_TIME BIGINT DEFAULT 3600000, + APP_ACCESS_TOKEN_EXPIRE_TIME BIGINT DEFAULT 3600000, + REFRESH_TOKEN_EXPIRE_TIME BIGINT DEFAULT 84600000, CONSTRAINT CONSUMER_KEY_CONSTRAINT UNIQUE (CONSUMER_KEY), PRIMARY KEY (ID) )ENGINE INNODB; +CREATE TABLE IF NOT EXISTS IDN_OAUTH2_SCOPE_VALIDATORS ( + APP_ID INTEGER NOT NULL, + SCOPE_VALIDATOR VARCHAR (128) NOT NULL, + PRIMARY KEY (APP_ID,SCOPE_VALIDATOR), + FOREIGN KEY (APP_ID) REFERENCES IDN_OAUTH_CONSUMER_APPS(ID) ON DELETE CASCADE +)ENGINE INNODB; + CREATE TABLE IF NOT EXISTS IDN_OAUTH1A_REQUEST_TOKEN ( REQUEST_TOKEN VARCHAR(255), REQUEST_TOKEN_SECRET VARCHAR(512), @@ -58,8 +68,8 @@ CREATE TABLE IF NOT EXISTS IDN_OAUTH1A_ACCESS_TOKEN ( CREATE TABLE IF NOT EXISTS IDN_OAUTH2_ACCESS_TOKEN ( TOKEN_ID VARCHAR (255), - ACCESS_TOKEN VARCHAR(255), - REFRESH_TOKEN VARCHAR(255), + ACCESS_TOKEN VARCHAR(2048), + REFRESH_TOKEN VARCHAR(2048), CONSUMER_KEY_ID INTEGER, AUTHZ_USER VARCHAR (100), TENANT_ID INTEGER, @@ -74,6 +84,8 @@ CREATE TABLE IF NOT EXISTS IDN_OAUTH2_ACCESS_TOKEN ( TOKEN_STATE VARCHAR(25) DEFAULT 'ACTIVE', TOKEN_STATE_ID VARCHAR (128) DEFAULT 'NONE', SUBJECT_IDENTIFIER VARCHAR(255), + ACCESS_TOKEN_HASH VARCHAR(512), + REFRESH_TOKEN_HASH VARCHAR(512), PRIMARY KEY (TOKEN_ID), FOREIGN KEY (CONSUMER_KEY_ID) REFERENCES IDN_OAUTH_CONSUMER_APPS(ID) ON DELETE CASCADE, CONSTRAINT CON_APP_KEY UNIQUE (CONSUMER_KEY_ID,AUTHZ_USER,TENANT_ID,USER_DOMAIN,USER_TYPE,TOKEN_SCOPE_HASH, @@ -84,11 +96,11 @@ CREATE INDEX IDX_AT_CK_AU ON IDN_OAUTH2_ACCESS_TOKEN(CONSUMER_KEY_ID, AUTHZ_USER CREATE INDEX IDX_TC ON IDN_OAUTH2_ACCESS_TOKEN(TIME_CREATED); -CREATE INDEX IDX_AT ON IDN_OAUTH2_ACCESS_TOKEN(ACCESS_TOKEN); +CREATE INDEX IDX_ATH ON IDN_OAUTH2_ACCESS_TOKEN(ACCESS_TOKEN_HASH); CREATE TABLE IF NOT EXISTS IDN_OAUTH2_AUTHORIZATION_CODE ( CODE_ID VARCHAR (255), - AUTHORIZATION_CODE VARCHAR(512), + AUTHORIZATION_CODE VARCHAR(2048), CONSUMER_KEY_ID INTEGER, CALLBACK_URL VARCHAR(1024), SCOPE VARCHAR(2048), @@ -102,11 +114,12 @@ CREATE TABLE IF NOT EXISTS IDN_OAUTH2_AUTHORIZATION_CODE ( SUBJECT_IDENTIFIER VARCHAR(255), PKCE_CODE_CHALLENGE VARCHAR(255), PKCE_CODE_CHALLENGE_METHOD VARCHAR(128), + AUTHORIZATION_CODE_HASH VARCHAR(512), PRIMARY KEY (CODE_ID), FOREIGN KEY (CONSUMER_KEY_ID) REFERENCES IDN_OAUTH_CONSUMER_APPS(ID) ON DELETE CASCADE )ENGINE INNODB; -CREATE INDEX IDX_AUTHORIZATION_CODE ON IDN_OAUTH2_AUTHORIZATION_CODE (AUTHORIZATION_CODE,CONSUMER_KEY_ID); +CREATE INDEX IDX_AUTHORIZATION_CODE_HASH ON IDN_OAUTH2_AUTHORIZATION_CODE (AUTHORIZATION_CODE_HASH,CONSUMER_KEY_ID); CREATE TABLE IF NOT EXISTS IDN_OAUTH2_ACCESS_TOKEN_SCOPE ( TOKEN_ID VARCHAR (255), @@ -117,21 +130,26 @@ CREATE TABLE IF NOT EXISTS IDN_OAUTH2_ACCESS_TOKEN_SCOPE ( )ENGINE INNODB; CREATE TABLE IF NOT EXISTS IDN_OAUTH2_SCOPE ( - SCOPE_ID INT(11) NOT NULL AUTO_INCREMENT, - SCOPE_KEY VARCHAR(100) NOT NULL, - NAME VARCHAR(255) NULL, - DESCRIPTION VARCHAR(512) NULL, - TENANT_ID INT(11) NOT NULL DEFAULT 0, - ROLES VARCHAR (500) NULL, + SCOPE_ID INTEGER NOT NULL AUTO_INCREMENT, + NAME VARCHAR(255) NOT NULL, + DISPLAY_NAME VARCHAR(255) NOT NULL, + DESCRIPTION VARCHAR(512), + TENANT_ID INTEGER NOT NULL DEFAULT -1, PRIMARY KEY (SCOPE_ID) )ENGINE INNODB; +CREATE TABLE IF NOT EXISTS IDN_OAUTH2_SCOPE_BINDING ( + SCOPE_ID INTEGER NOT NULL, + SCOPE_BINDING VARCHAR(255), + FOREIGN KEY (SCOPE_ID) REFERENCES IDN_OAUTH2_SCOPE(SCOPE_ID) ON DELETE CASCADE +)ENGINE INNODB; + CREATE TABLE IF NOT EXISTS IDN_OAUTH2_RESOURCE_SCOPE ( RESOURCE_PATH VARCHAR(255) NOT NULL, - SCOPE_ID INTEGER (11) NOT NULL, + SCOPE_ID INTEGER NOT NULL, TENANT_ID INTEGER DEFAULT -1, PRIMARY KEY (RESOURCE_PATH), - FOREIGN KEY (SCOPE_ID) REFERENCES IDN_OAUTH2_SCOPE (SCOPE_ID) + FOREIGN KEY (SCOPE_ID) REFERENCES IDN_OAUTH2_SCOPE (SCOPE_ID) ON DELETE CASCADE )ENGINE INNODB; CREATE TABLE IF NOT EXISTS IDN_SCIM_GROUP ( @@ -186,7 +204,7 @@ CREATE TABLE IF NOT EXISTS IDN_IDENTITY_USER_DATA ( TENANT_ID INTEGER DEFAULT -1234, USER_NAME VARCHAR(255) NOT NULL, DATA_KEY VARCHAR(255) NOT NULL, - DATA_VALUE VARCHAR(255), + DATA_VALUE VARCHAR(2048), PRIMARY KEY (TENANT_ID, USER_NAME, DATA_KEY) )ENGINE INNODB; @@ -221,22 +239,22 @@ CREATE TABLE IF NOT EXISTS IDN_AUTH_SESSION_STORE ( CREATE TABLE IF NOT EXISTS SP_APP ( ID INTEGER NOT NULL AUTO_INCREMENT, TENANT_ID INTEGER NOT NULL, - APP_NAME VARCHAR (255) NOT NULL , - USER_STORE VARCHAR (255) NOT NULL, + APP_NAME VARCHAR (255) NOT NULL , + USER_STORE VARCHAR (255) NOT NULL, USERNAME VARCHAR (255) NOT NULL , DESCRIPTION VARCHAR (1024), - ROLE_CLAIM VARCHAR (512), + ROLE_CLAIM VARCHAR (512), AUTH_TYPE VARCHAR (255) NOT NULL, - PROVISIONING_USERSTORE_DOMAIN VARCHAR (512), - IS_LOCAL_CLAIM_DIALECT CHAR(1) DEFAULT '1', - IS_SEND_LOCAL_SUBJECT_ID CHAR(1) DEFAULT '0', - IS_SEND_AUTH_LIST_OF_IDPS CHAR(1) DEFAULT '0', + PROVISIONING_USERSTORE_DOMAIN VARCHAR (512), + IS_LOCAL_CLAIM_DIALECT CHAR(1) DEFAULT '1', + IS_SEND_LOCAL_SUBJECT_ID CHAR(1) DEFAULT '0', + IS_SEND_AUTH_LIST_OF_IDPS CHAR(1) DEFAULT '0', IS_USE_TENANT_DOMAIN_SUBJECT CHAR(1) DEFAULT '1', IS_USE_USER_DOMAIN_SUBJECT CHAR(1) DEFAULT '1', ENABLE_AUTHORIZATION CHAR(1) DEFAULT '0', - SUBJECT_CLAIM_URI VARCHAR (512), - IS_SAAS_APP CHAR(1) DEFAULT '0', - IS_DUMB_MODE CHAR(1) DEFAULT '0', + SUBJECT_CLAIM_URI VARCHAR (512), + IS_SAAS_APP CHAR(1) DEFAULT '0', + IS_DUMB_MODE CHAR(1) DEFAULT '0', PRIMARY KEY (ID) )ENGINE INNODB; @@ -296,7 +314,7 @@ CREATE TABLE IF NOT EXISTS SP_CLAIM_MAPPING ( SP_CLAIM VARCHAR (512) NOT NULL , APP_ID INTEGER NOT NULL, IS_REQUESTED VARCHAR(128) DEFAULT '0', - IS_MANDATORY VARCHAR(128) DEFAULT '0', + IS_MANDATORY VARCHAR(128) DEFAULT '0', DEFAULT_VALUE VARCHAR(255), PRIMARY KEY (ID) )ENGINE INNODB; @@ -338,60 +356,69 @@ CREATE TABLE IF NOT EXISTS SP_PROVISIONING_CONNECTOR ( ALTER TABLE SP_PROVISIONING_CONNECTOR ADD CONSTRAINT PRO_CONNECTOR_APPID_CONSTRAINT FOREIGN KEY (APP_ID) REFERENCES SP_APP (ID) ON DELETE CASCADE; +CREATE TABLE SP_AUTH_SCRIPT ( + ID INTEGER AUTO_INCREMENT NOT NULL, + TENANT_ID INTEGER NOT NULL, + APP_ID INTEGER NOT NULL, + TYPE VARCHAR(255) NOT NULL, + CONTENT BLOB DEFAULT NULL, + IS_ENABLED CHAR(1) NOT NULL DEFAULT '0', + PRIMARY KEY (ID)); + CREATE TABLE IF NOT EXISTS IDP ( - ID INTEGER AUTO_INCREMENT, - TENANT_ID INTEGER, - NAME VARCHAR(254) NOT NULL, - IS_ENABLED CHAR(1) NOT NULL DEFAULT '1', - IS_PRIMARY CHAR(1) NOT NULL DEFAULT '0', - HOME_REALM_ID VARCHAR(254), - IMAGE MEDIUMBLOB, - CERTIFICATE BLOB, - ALIAS VARCHAR(254), - INBOUND_PROV_ENABLED CHAR (1) NOT NULL DEFAULT '0', - INBOUND_PROV_USER_STORE_ID VARCHAR(254), - USER_CLAIM_URI VARCHAR(254), - ROLE_CLAIM_URI VARCHAR(254), - DESCRIPTION VARCHAR (1024), - DEFAULT_AUTHENTICATOR_NAME VARCHAR(254), - DEFAULT_PRO_CONNECTOR_NAME VARCHAR(254), - PROVISIONING_ROLE VARCHAR(128), - IS_FEDERATION_HUB CHAR(1) NOT NULL DEFAULT '0', - IS_LOCAL_CLAIM_DIALECT CHAR(1) NOT NULL DEFAULT '0', + ID INTEGER AUTO_INCREMENT, + TENANT_ID INTEGER, + NAME VARCHAR(254) NOT NULL, + IS_ENABLED CHAR(1) NOT NULL DEFAULT '1', + IS_PRIMARY CHAR(1) NOT NULL DEFAULT '0', + HOME_REALM_ID VARCHAR(254), + IMAGE MEDIUMBLOB, + CERTIFICATE BLOB, + ALIAS VARCHAR(254), + INBOUND_PROV_ENABLED CHAR (1) NOT NULL DEFAULT '0', + INBOUND_PROV_USER_STORE_ID VARCHAR(254), + USER_CLAIM_URI VARCHAR(254), + ROLE_CLAIM_URI VARCHAR(254), + DESCRIPTION VARCHAR (1024), + DEFAULT_AUTHENTICATOR_NAME VARCHAR(254), + DEFAULT_PRO_CONNECTOR_NAME VARCHAR(254), + PROVISIONING_ROLE VARCHAR(128), + IS_FEDERATION_HUB CHAR(1) NOT NULL DEFAULT '0', + IS_LOCAL_CLAIM_DIALECT CHAR(1) NOT NULL DEFAULT '0', DISPLAY_NAME VARCHAR(255), - PRIMARY KEY (ID), - UNIQUE (TENANT_ID, NAME) + PRIMARY KEY (ID), + UNIQUE (TENANT_ID, NAME) )ENGINE INNODB; CREATE TABLE IF NOT EXISTS IDP_ROLE ( - ID INTEGER AUTO_INCREMENT, - IDP_ID INTEGER, - TENANT_ID INTEGER, - ROLE VARCHAR(254), - PRIMARY KEY (ID), - UNIQUE (IDP_ID, ROLE), - FOREIGN KEY (IDP_ID) REFERENCES IDP(ID) ON DELETE CASCADE + ID INTEGER AUTO_INCREMENT, + IDP_ID INTEGER, + TENANT_ID INTEGER, + ROLE VARCHAR(254), + PRIMARY KEY (ID), + UNIQUE (IDP_ID, ROLE), + FOREIGN KEY (IDP_ID) REFERENCES IDP(ID) ON DELETE CASCADE )ENGINE INNODB; CREATE TABLE IF NOT EXISTS IDP_ROLE_MAPPING ( - ID INTEGER AUTO_INCREMENT, - IDP_ROLE_ID INTEGER, - TENANT_ID INTEGER, - USER_STORE_ID VARCHAR (253), - LOCAL_ROLE VARCHAR(253), - PRIMARY KEY (ID), - UNIQUE (IDP_ROLE_ID, TENANT_ID, USER_STORE_ID, LOCAL_ROLE), - FOREIGN KEY (IDP_ROLE_ID) REFERENCES IDP_ROLE(ID) ON DELETE CASCADE + ID INTEGER AUTO_INCREMENT, + IDP_ROLE_ID INTEGER, + TENANT_ID INTEGER, + USER_STORE_ID VARCHAR (253), + LOCAL_ROLE VARCHAR(253), + PRIMARY KEY (ID), + UNIQUE (IDP_ROLE_ID, TENANT_ID, USER_STORE_ID, LOCAL_ROLE), + FOREIGN KEY (IDP_ROLE_ID) REFERENCES IDP_ROLE(ID) ON DELETE CASCADE )ENGINE INNODB; CREATE TABLE IF NOT EXISTS IDP_CLAIM ( - ID INTEGER AUTO_INCREMENT, - IDP_ID INTEGER, - TENANT_ID INTEGER, - CLAIM VARCHAR(254), - PRIMARY KEY (ID), - UNIQUE (IDP_ID, CLAIM), - FOREIGN KEY (IDP_ID) REFERENCES IDP(ID) ON DELETE CASCADE + ID INTEGER AUTO_INCREMENT, + IDP_ID INTEGER, + TENANT_ID INTEGER, + CLAIM VARCHAR(254), + PRIMARY KEY (ID), + UNIQUE (IDP_ID, CLAIM), + FOREIGN KEY (IDP_ID) REFERENCES IDP(ID) ON DELETE CASCADE )ENGINE INNODB; CREATE TABLE IF NOT EXISTS IDP_CLAIM_MAPPING ( @@ -525,7 +552,7 @@ CREATE TABLE IF NOT EXISTS FIDO_DEVICE_STORE ( DEVICE_DATA VARCHAR(2048) NOT NULL, PRIMARY KEY (TENANT_ID, DOMAIN_NAME, USER_NAME, KEY_HANDLE) )ENGINE INNODB; - + CREATE TABLE IF NOT EXISTS WF_REQUEST ( UUID VARCHAR (45), CREATED_BY VARCHAR (255), @@ -607,11 +634,11 @@ CREATE TABLE IF NOT EXISTS WF_WORKFLOW_REQUEST_RELATION( CREATE TABLE IF NOT EXISTS IDN_RECOVERY_DATA ( USER_NAME VARCHAR(255) NOT NULL, - USER_DOMAIN VARCHAR(255) NOT NULL, + USER_DOMAIN VARCHAR(127) NOT NULL, TENANT_ID INTEGER DEFAULT -1, CODE VARCHAR(255) NOT NULL, SCENARIO VARCHAR(255) NOT NULL, - STEP VARCHAR(255) NOT NULL, + STEP VARCHAR(127) NOT NULL, TIME_CREATED TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, REMAINING_SETS VARCHAR(2500) DEFAULT NULL, PRIMARY KEY(USER_NAME, USER_DOMAIN, TENANT_ID, SCENARIO,STEP), @@ -692,8 +719,192 @@ CREATE TABLE IF NOT EXISTS IDN_SAML2_ASSERTION_STORE ( PRIMARY KEY (ID) )ENGINE INNODB; +CREATE TABLE IF NOT EXISTS IDN_OIDC_JTI ( + JWT_ID VARCHAR(255) NOT NULL, + EXP_TIME TIMESTAMP NOT NULL , + TIME_CREATED TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP , + PRIMARY KEY (JWT_ID) +)ENGINE INNODB; + +CREATE TABLE IF NOT EXISTS IDN_OIDC_PROPERTY ( + ID INTEGER NOT NULL AUTO_INCREMENT, + TENANT_ID INTEGER, + CONSUMER_KEY VARCHAR(255) , + PROPERTY_KEY VARCHAR(255) NOT NULL, + PROPERTY_VALUE VARCHAR(2047) , + PRIMARY KEY (ID), + FOREIGN KEY (CONSUMER_KEY) REFERENCES IDN_OAUTH_CONSUMER_APPS(CONSUMER_KEY) ON DELETE CASCADE +)ENGINE INNODB; + +CREATE TABLE IF NOT EXISTS IDN_OIDC_REQ_OBJECT_REFERENCE ( + ID INTEGER NOT NULL AUTO_INCREMENT, + CONSUMER_KEY_ID INTEGER , + CODE_ID VARCHAR(255) , + TOKEN_ID VARCHAR(255) , + SESSION_DATA_KEY VARCHAR(255), + PRIMARY KEY (ID), + FOREIGN KEY (CONSUMER_KEY_ID) REFERENCES IDN_OAUTH_CONSUMER_APPS(ID) ON DELETE CASCADE, + FOREIGN KEY (TOKEN_ID) REFERENCES IDN_OAUTH2_ACCESS_TOKEN(TOKEN_ID) ON DELETE CASCADE, + FOREIGN KEY (CODE_ID) REFERENCES IDN_OAUTH2_AUTHORIZATION_CODE(CODE_ID) ON DELETE CASCADE +)ENGINE INNODB; + +CREATE TABLE IF NOT EXISTS IDN_OIDC_REQ_OBJECT_CLAIMS ( + ID INTEGER NOT NULL AUTO_INCREMENT, + REQ_OBJECT_ID INTEGER, + CLAIM_ATTRIBUTE VARCHAR(255) , + ESSENTIAL CHAR(1) NOT NULL DEFAULT '0' , + VALUE VARCHAR(255) , + IS_USERINFO CHAR(1) NOT NULL DEFAULT '0', + PRIMARY KEY (ID), + FOREIGN KEY (REQ_OBJECT_ID) REFERENCES IDN_OIDC_REQ_OBJECT_REFERENCE (ID) ON DELETE CASCADE +)ENGINE INNODB; + +CREATE TABLE IF NOT EXISTS IDN_OIDC_REQ_OBJ_CLAIM_VALUES ( + ID INTEGER NOT NULL AUTO_INCREMENT, + REQ_OBJECT_CLAIMS_ID INTEGER , + CLAIM_VALUES VARCHAR(255) , + PRIMARY KEY (ID), + FOREIGN KEY (REQ_OBJECT_CLAIMS_ID) REFERENCES IDN_OIDC_REQ_OBJECT_CLAIMS(ID) ON DELETE CASCADE +)ENGINE INNODB; + +CREATE TABLE IF NOT EXISTS IDN_CERTIFICATE ( + ID INTEGER NOT NULL AUTO_INCREMENT, + NAME VARCHAR(100), + CERTIFICATE_IN_PEM BLOB, + TENANT_ID INTEGER DEFAULT 0, + PRIMARY KEY(ID), + CONSTRAINT CERTIFICATE_UNIQUE_KEY UNIQUE (NAME, TENANT_ID) +)ENGINE INNODB; + + -- End of IDENTITY Tables-- +-- Start of CONSENT-MGT Tables -- + +CREATE TABLE CM_PII_CATEGORY ( + ID INTEGER AUTO_INCREMENT, + NAME VARCHAR(255) NOT NULL, + DESCRIPTION VARCHAR(1023), + DISPLAY_NAME VARCHAR(255), + IS_SENSITIVE INTEGER NOT NULL, + TENANT_ID INTEGER DEFAULT '-1234', + UNIQUE KEY (NAME, TENANT_ID), + PRIMARY KEY (ID) +)ENGINE INNODB; + +CREATE TABLE CM_RECEIPT ( + CONSENT_RECEIPT_ID VARCHAR(255) NOT NULL, + VERSION VARCHAR(255) NOT NULL, + JURISDICTION VARCHAR(255) NOT NULL, + CONSENT_TIMESTAMP TIMESTAMP NOT NULL, + COLLECTION_METHOD VARCHAR(255) NOT NULL, + LANGUAGE VARCHAR(255) NOT NULL, + PII_PRINCIPAL_ID VARCHAR(255) NOT NULL, + PRINCIPAL_TENANT_ID INTEGER DEFAULT '-1234', + POLICY_URL VARCHAR(255) NOT NULL, + STATE VARCHAR(255) NOT NULL, + PII_CONTROLLER VARCHAR(2048) NOT NULL, + PRIMARY KEY (CONSENT_RECEIPT_ID) +)ENGINE INNODB; + +CREATE TABLE CM_PURPOSE ( + ID INTEGER AUTO_INCREMENT, + NAME VARCHAR(255) NOT NULL, + DESCRIPTION VARCHAR(1023), + TENANT_ID INTEGER DEFAULT '-1234', + UNIQUE KEY (NAME, TENANT_ID), + PRIMARY KEY (ID) +)ENGINE INNODB; + +CREATE TABLE CM_PURPOSE_CATEGORY ( + ID INTEGER AUTO_INCREMENT, + NAME VARCHAR(255) NOT NULL, + DESCRIPTION VARCHAR(1023), + TENANT_ID INTEGER DEFAULT '-1234', + UNIQUE KEY (NAME, TENANT_ID), + PRIMARY KEY (ID) +)ENGINE INNODB; + +CREATE TABLE CM_RECEIPT_SP_ASSOC ( + ID INTEGER AUTO_INCREMENT, + CONSENT_RECEIPT_ID VARCHAR(255) NOT NULL, + SP_NAME VARCHAR(255) NOT NULL, + SP_DISPLAY_NAME VARCHAR(255), + SP_DESCRIPTION VARCHAR(255), + SP_TENANT_ID INTEGER DEFAULT '-1234', + UNIQUE KEY (CONSENT_RECEIPT_ID, SP_NAME, SP_TENANT_ID), + PRIMARY KEY (ID) +)ENGINE INNODB; + +CREATE TABLE CM_SP_PURPOSE_ASSOC ( + ID INTEGER AUTO_INCREMENT, + RECEIPT_SP_ASSOC INTEGER NOT NULL, + PURPOSE_ID INTEGER NOT NULL, + CONSENT_TYPE VARCHAR(255) NOT NULL, + IS_PRIMARY_PURPOSE INTEGER NOT NULL, + TERMINATION VARCHAR(255) NOT NULL, + THIRD_PARTY_DISCLOSURE INTEGER NOT NULL, + THIRD_PARTY_NAME VARCHAR(255), + UNIQUE KEY (RECEIPT_SP_ASSOC, PURPOSE_ID), + PRIMARY KEY (ID) +)ENGINE INNODB; + +CREATE TABLE CM_SP_PURPOSE_PURPOSE_CAT_ASSC ( + SP_PURPOSE_ASSOC_ID INTEGER NOT NULL, + PURPOSE_CATEGORY_ID INTEGER NOT NULL, + UNIQUE KEY (SP_PURPOSE_ASSOC_ID, PURPOSE_CATEGORY_ID) +)ENGINE INNODB; + +CREATE TABLE CM_PURPOSE_PII_CAT_ASSOC ( + PURPOSE_ID INTEGER NOT NULL, + CM_PII_CATEGORY_ID INTEGER NOT NULL, + UNIQUE KEY (PURPOSE_ID, CM_PII_CATEGORY_ID) +)ENGINE INNODB; + +CREATE TABLE CM_SP_PURPOSE_PII_CAT_ASSOC ( + SP_PURPOSE_ASSOC_ID INTEGER NOT NULL, + PII_CATEGORY_ID INTEGER NOT NULL, + VALIDITY VARCHAR(1023), + UNIQUE KEY (SP_PURPOSE_ASSOC_ID, PII_CATEGORY_ID) +)ENGINE INNODB; + +CREATE TABLE CM_CONSENT_RECEIPT_PROPERTY ( + CONSENT_RECEIPT_ID VARCHAR(255) NOT NULL, + NAME VARCHAR(255) NOT NULL, + VALUE VARCHAR(1023) NOT NULL, + UNIQUE KEY (CONSENT_RECEIPT_ID, NAME) +)ENGINE INNODB; + +ALTER TABLE CM_RECEIPT_SP_ASSOC + ADD CONSTRAINT CM_RECEIPT_SP_ASSOC_fk0 FOREIGN KEY (CONSENT_RECEIPT_ID) REFERENCES CM_RECEIPT (CONSENT_RECEIPT_ID); + +ALTER TABLE CM_SP_PURPOSE_ASSOC + ADD CONSTRAINT CM_SP_PURPOSE_ASSOC_fk0 FOREIGN KEY (RECEIPT_SP_ASSOC) REFERENCES CM_RECEIPT_SP_ASSOC (ID); + +ALTER TABLE CM_SP_PURPOSE_ASSOC + ADD CONSTRAINT CM_SP_PURPOSE_ASSOC_fk1 FOREIGN KEY (PURPOSE_ID) REFERENCES CM_PURPOSE (ID); + +ALTER TABLE CM_SP_PURPOSE_PURPOSE_CAT_ASSC + ADD CONSTRAINT CM_SP_P_P_CAT_ASSOC_fk0 FOREIGN KEY (SP_PURPOSE_ASSOC_ID) REFERENCES CM_SP_PURPOSE_ASSOC (ID); + +ALTER TABLE CM_SP_PURPOSE_PURPOSE_CAT_ASSC + ADD CONSTRAINT CM_SP_P_P_CAT_ASSOC_fk1 FOREIGN KEY (PURPOSE_CATEGORY_ID) REFERENCES CM_PURPOSE_CATEGORY (ID); + +ALTER TABLE CM_SP_PURPOSE_PII_CAT_ASSOC + ADD CONSTRAINT CM_SP_P_PII_CAT_ASSOC_fk0 FOREIGN KEY (SP_PURPOSE_ASSOC_ID) REFERENCES CM_SP_PURPOSE_ASSOC (ID); + +ALTER TABLE CM_SP_PURPOSE_PII_CAT_ASSOC + ADD CONSTRAINT CM_SP_P_PII_CAT_ASSOC_fk1 FOREIGN KEY (PII_CATEGORY_ID) REFERENCES CM_PII_CATEGORY (ID); + +ALTER TABLE CM_CONSENT_RECEIPT_PROPERTY + ADD CONSTRAINT CM_CONSENT_RECEIPT_PRT_fk0 FOREIGN KEY (CONSENT_RECEIPT_ID) REFERENCES CM_RECEIPT (CONSENT_RECEIPT_ID); + +INSERT INTO CM_PURPOSE (NAME, DESCRIPTION, TENANT_ID) values ('DEFAULT', 'For core functionalities of the product', '-1234'); + +INSERT INTO CM_PURPOSE_CATEGORY (NAME, DESCRIPTION, TENANT_ID) VALUES ('DEFAULT','For core functionalities of the product', '-1234'); + +-- End of CONSENT-MGT Tables -- + -- Start of API-MGT Tables -- CREATE TABLE IF NOT EXISTS AM_SUBSCRIBER ( SUBSCRIBER_ID INTEGER AUTO_INCREMENT, @@ -777,7 +988,7 @@ CREATE TABLE IF NOT EXISTS AM_SUBSCRIPTION ( CREATE TABLE IF NOT EXISTS AM_SUBSCRIPTION_KEY_MAPPING ( SUBSCRIPTION_ID INTEGER, - ACCESS_TOKEN VARCHAR(255), + ACCESS_TOKEN VARCHAR(512), KEY_TYPE VARCHAR(512) NOT NULL, FOREIGN KEY(SUBSCRIPTION_ID) REFERENCES AM_SUBSCRIPTION(SUBSCRIPTION_ID) ON UPDATE CASCADE ON DELETE RESTRICT, PRIMARY KEY(SUBSCRIPTION_ID,ACCESS_TOKEN) @@ -872,7 +1083,7 @@ CREATE TABLE IF NOT EXISTS AM_APPLICATION_REGISTRATION ( WF_REF VARCHAR(255) NOT NULL, APP_ID INT, TOKEN_TYPE VARCHAR(30), - TOKEN_SCOPE VARCHAR(256) DEFAULT 'default', + TOKEN_SCOPE VARCHAR(1500) DEFAULT 'default', INPUTS VARCHAR(1000), ALLOWED_DOMAINS VARCHAR(256), VALIDITY_PERIOD BIGINT, @@ -890,10 +1101,10 @@ CREATE TABLE IF NOT EXISTS AM_API_SCOPES ( )ENGINE = INNODB; CREATE TABLE IF NOT EXISTS AM_API_DEFAULT_VERSION ( - DEFAULT_VERSION_ID INT AUTO_INCREMENT, + DEFAULT_VERSION_ID INT AUTO_INCREMENT, API_NAME VARCHAR(256) NOT NULL , - API_PROVIDER VARCHAR(256) NOT NULL , - DEFAULT_API_VERSION VARCHAR(30) , + API_PROVIDER VARCHAR(256) NOT NULL , + DEFAULT_API_VERSION VARCHAR(30) , PUBLISHED_DEFAULT_API_VERSION VARCHAR(30) , PRIMARY KEY (DEFAULT_VERSION_ID) )ENGINE = INNODB; @@ -902,29 +1113,29 @@ CREATE INDEX IDX_SUB_APP_ID ON AM_SUBSCRIPTION (APPLICATION_ID, SUBSCRIPTION_ID) CREATE TABLE IF NOT EXISTS AM_ALERT_TYPES ( - ALERT_TYPE_ID INTEGER AUTO_INCREMENT, + ALERT_TYPE_ID INTEGER AUTO_INCREMENT, ALERT_TYPE_NAME VARCHAR(255) NOT NULL , STAKE_HOLDER VARCHAR(100) NOT NULL, PRIMARY KEY (ALERT_TYPE_ID) )ENGINE = INNODB; CREATE TABLE IF NOT EXISTS AM_ALERT_TYPES_VALUES ( - ALERT_TYPE_ID INTEGER, + ALERT_TYPE_ID INTEGER, USER_NAME VARCHAR(255) NOT NULL , STAKE_HOLDER VARCHAR(100) NOT NULL , PRIMARY KEY (ALERT_TYPE_ID,USER_NAME,STAKE_HOLDER) )ENGINE = INNODB; -CREATE TABLE IF NOT EXISTS AM_ALERT_EMAILLIST ( - EMAIL_LIST_ID INTEGER AUTO_INCREMENT, - USER_NAME VARCHAR(255) NOT NULL , +CREATE TABLE IF NOT EXISTS AM_ALERT_EMAILLIST ( + EMAIL_LIST_ID INTEGER AUTO_INCREMENT, + USER_NAME VARCHAR(255) NOT NULL , STAKE_HOLDER VARCHAR(100) NOT NULL , PRIMARY KEY (EMAIL_LIST_ID,USER_NAME,STAKE_HOLDER) )ENGINE = INNODB; -CREATE TABLE IF NOT EXISTS AM_ALERT_EMAILLIST_DETAILS ( +CREATE TABLE IF NOT EXISTS AM_ALERT_EMAILLIST_DETAILS ( EMAIL_LIST_ID INTEGER, - EMAIL VARCHAR(255), + EMAIL VARCHAR(255), PRIMARY KEY (EMAIL_LIST_ID,EMAIL) )ENGINE = INNODB; @@ -1108,12 +1319,43 @@ CREATE TABLE `AM_BLOCK_CONDITIONS` ( UNIQUE (`UUID`) ) ENGINE=InnoDB; +CREATE TABLE IF NOT EXISTS `AM_CERTIFICATE_METADATA` ( + `TENANT_ID` INT(11) NOT NULL, + `ALIAS` VARCHAR(45) NOT NULL, + `END_POINT` VARCHAR(100) NOT NULL, + CONSTRAINT PK_ALIAS PRIMARY KEY (`ALIAS`), + CONSTRAINT END_POINT_CONSTRAINT UNIQUE (`END_POINT`) +) ENGINE=InnoDB; + +CREATE TABLE IF NOT EXISTS AM_APPLICATION_GROUP_MAPPING ( + APPLICATION_ID INTEGER NOT NULL, + GROUP_ID VARCHAR(512) NOT NULL, + TENANT VARCHAR(255), + PRIMARY KEY (APPLICATION_ID,GROUP_ID,TENANT), + FOREIGN KEY (APPLICATION_ID) REFERENCES AM_APPLICATION(APPLICATION_ID) ON DELETE CASCADE ON UPDATE CASCADE +) ENGINE=InnoDB; + +CREATE TABLE IF NOT EXISTS AM_USAGE_UPLOADED_FILES ( + TENANT_DOMAIN varchar(255) NOT NULL, + FILE_NAME varchar(255) NOT NULL, + FILE_TIMESTAMP TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + FILE_PROCESSED tinyint(1) DEFAULT FALSE, + FILE_CONTENT MEDIUMBLOB DEFAULT NULL, + PRIMARY KEY (TENANT_DOMAIN, FILE_NAME, FILE_TIMESTAMP) +) ENGINE=InnoDB; + +CREATE TABLE IF NOT EXISTS AM_API_LC_PUBLISH_EVENTS ( + ID INTEGER(11) NOT NULL AUTO_INCREMENT, + TENANT_DOMAIN VARCHAR(500) NOT NULL, + API_ID VARCHAR(500) NOT NULL, + EVENT_TIME TIMESTAMP NOT NULL, + PRIMARY KEY (ID) +) ENGINE=InnoDB; -- End of API-MGT Tables -- -- Performance indexes start-- create index IDX_ITS_LMT on IDN_THRIFT_SESSION (LAST_MODIFIED_TIME); -create index IDX_IOAT_AT on IDN_OAUTH2_ACCESS_TOKEN (ACCESS_TOKEN); create index IDX_IOAT_UT on IDN_OAUTH2_ACCESS_TOKEN (USER_TYPE); create index IDX_AAI_CTX on AM_API (CONTEXT); create index IDX_AAKM_CK on AM_APPLICATION_KEY_MAPPING (CONSUMER_KEY); diff --git a/docker-compose/APIM-ISasKM-with-Analytics/mysql/scripts/carbon_mysql5.7.sql b/docker-compose/APIM-ISasKM-with-Analytics/mysql/scripts/carbon_mysql5.7.sql index 5378702f..614c1a55 100644 --- a/docker-compose/APIM-ISasKM-with-Analytics/mysql/scripts/carbon_mysql5.7.sql +++ b/docker-compose/APIM-ISasKM-with-Analytics/mysql/scripts/carbon_mysql5.7.sql @@ -306,6 +306,7 @@ CREATE TABLE UM_PERMISSION ( UM_ACTION VARCHAR(255) NOT NULL, UM_TENANT_ID INTEGER DEFAULT 0, UM_MODULE_ID INTEGER DEFAULT 0, + UNIQUE(UM_RESOURCE_ID,UM_ACTION, UM_TENANT_ID), PRIMARY KEY (UM_ID, UM_TENANT_ID) )ENGINE INNODB; @@ -420,6 +421,16 @@ CREATE TABLE UM_PROFILE_CONFIG( PRIMARY KEY (UM_ID, UM_TENANT_ID) )ENGINE INNODB; +CREATE TABLE IF NOT EXISTS UM_CLAIM_BEHAVIOR( + UM_ID INTEGER NOT NULL AUTO_INCREMENT, + UM_PROFILE_ID INTEGER, + UM_CLAIM_ID INTEGER, + UM_BEHAVIOUR SMALLINT, + UM_TENANT_ID INTEGER DEFAULT 0, + FOREIGN KEY(UM_PROFILE_ID, UM_TENANT_ID) REFERENCES UM_PROFILE_CONFIG(UM_ID,UM_TENANT_ID), + FOREIGN KEY(UM_CLAIM_ID, UM_TENANT_ID) REFERENCES UM_CLAIM(UM_ID,UM_TENANT_ID), + PRIMARY KEY(UM_ID, UM_TENANT_ID) +)ENGINE INNODB; CREATE TABLE UM_HYBRID_ROLE( UM_ID INTEGER NOT NULL AUTO_INCREMENT, @@ -447,6 +458,8 @@ CREATE TABLE UM_SYSTEM_ROLE( PRIMARY KEY (UM_ID, UM_TENANT_ID) )ENGINE INNODB; +CREATE INDEX SYSTEM_ROLE_IND_BY_RN_TI ON UM_SYSTEM_ROLE(UM_ROLE_NAME, UM_TENANT_ID); + CREATE TABLE UM_SYSTEM_USER_ROLE( UM_ID INTEGER NOT NULL AUTO_INCREMENT, UM_USER_NAME VARCHAR(255), diff --git a/dockerfiles/apim-analytics/Dockerfile b/dockerfiles/apim-analytics/Dockerfile index 6ee59b00..582c9606 100644 --- a/dockerfiles/apim-analytics/Dockerfile +++ b/dockerfiles/apim-analytics/Dockerfile @@ -33,7 +33,7 @@ ARG JDK=jdk1.8.0* ARG JAVA_HOME=${USER_HOME}/java # set wso2 product configurations ARG WSO2_SERVER=wso2am-analytics -ARG WSO2_SERVER_VERSION=2.1.0 +ARG WSO2_SERVER_VERSION=2.2.0 ARG WSO2_SERVER_DIST=${WSO2_SERVER}-${WSO2_SERVER_VERSION} ARG WSO2_SERVER_HOME=${USER_HOME}/${WSO2_SERVER}-${WSO2_SERVER_VERSION} diff --git a/dockerfiles/apim-analytics/README.md b/dockerfiles/apim-analytics/README.md index a20e4562..deb78849 100644 --- a/dockerfiles/apim-analytics/README.md +++ b/dockerfiles/apim-analytics/README.md @@ -1,5 +1,5 @@ # Dockerfile for WSO2 API Manager Analytics # -The section defines the step-by-step instructions to build the Docker image for WSO2 API Manager Analytics 2.1.0. +The section defines the step-by-step instructions to build the Docker image for WSO2 API Manager Analytics 2.2.0. ## Prerequisites @@ -16,13 +16,13 @@ git clone https://github.com/wso2/docker-apim.git ##### 2. Add JDK, WSO2 API Manager Analytics distributions and MySQL Connector to `/files` - Download [JDK 1.8](http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html) and extract that to `/files`. -- Download the WSO2 API Manager Analytics 2.1.0 distribution (http://wso2.com/api-management/try-it/) +- Download the WSO2 API Manager Analytics 2.2.0 distribution (http://wso2.com/api-management/try-it/) and extract that to `/files`.
- Once both JDK and WSO2 API Manager distributions are extracted the folder structure should be as follows; ```bash /files/jdk/ - /files/wso2am-analytics-2.1.0/ + /files/wso2am-analytics-2.2.0/ ``` - Download [MySQL Connector/J](https://dev.mysql.com/downloads/connector/j/) v5.1.45 and then copy that to `/files` folder @@ -32,10 +32,10 @@ in order to obtain latest bug fixes and updates for the product. ##### 3. Build the Docker image. - Navigate to `` directory.
Execute `docker build` command as shown below. - + `docker build -t wso2am-analytics:2.1.0 .` + + `docker build -t wso2am-analytics:2.2.0 .` ##### 4. Running the Docker image. -- `docker run -it -p 9444:9444 wso2am-analytics:2.1.0` +- `docker run -it -p 9444:9444 wso2am-analytics:2.2.0` >Here, only port 9444 (HTTPS servlet transport) has been mapped to a Docker host port. You may map other container service ports, which have been exposed to Docker host ports, as desired. @@ -51,7 +51,7 @@ Configurations would lie on the Docker host machine and they can be volume mount As an example, steps required to change the port offset using `carbon.xml` is as follows. ##### 1. Stop the API Manager container if it's already running. -In WSO2 API Manager Analytics 2.1.0 product distribution, `carbon.xml` configuration file
+In WSO2 API Manager Analytics 2.2.0 product distribution, `carbon.xml` configuration file
can be found at `/conf`. Copy the file to some suitable location of the host machine,
referred to as `/carbon.xml` and change the offset value under ports to 1. @@ -65,10 +65,10 @@ chmod o+r /carbon.xml docker run -p 9445:9445 --volume /carbon.xml:/carbon.xml -wso2am-analytics:2.1.0 +wso2am-analytics:2.2.0 ``` ->In here, refers to /home/wso2carbon/wso2am-analytics-2.1.0/repository/conf folder of the container. +>In here, refers to /home/wso2carbon/wso2am-analytics-2.2.0/repository/conf folder of the container. ## Docker command usage references diff --git a/dockerfiles/apim/Dockerfile b/dockerfiles/apim/Dockerfile index 24e16fcc..ef5f5e33 100644 --- a/dockerfiles/apim/Dockerfile +++ b/dockerfiles/apim/Dockerfile @@ -33,7 +33,7 @@ ARG JDK=jdk1.8.0* ARG JAVA_HOME=${USER_HOME}/java # set wso2 product configurations ARG WSO2_SERVER=wso2am -ARG WSO2_SERVER_VERSION=2.1.0 +ARG WSO2_SERVER_VERSION=2.2.0 ARG WSO2_SERVER_DIST=${WSO2_SERVER}-${WSO2_SERVER_VERSION} ARG WSO2_SERVER_HOME=${USER_HOME}/${WSO2_SERVER}-${WSO2_SERVER_VERSION} diff --git a/dockerfiles/apim/README.md b/dockerfiles/apim/README.md index 4ca7ab76..83d7c15f 100644 --- a/dockerfiles/apim/README.md +++ b/dockerfiles/apim/README.md @@ -1,5 +1,5 @@ # Dockerfile for WSO2 API Manager # -The section defines the step-by-step instructions to build the Docker image for WSO2 API Manager 2.1.0. +The section defines the step-by-step instructions to build the Docker image for WSO2 API Manager 2.2.0. ## Prerequisites @@ -17,13 +17,13 @@ git clone https://github.com/wso2/docker-apim.git ##### 2. Add JDK, WSO2 API Manager distributions and MySQL connector to `/files` - Download [JDK 1.8](http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html) and extract that in `/files` folder. -- Download the WSO2 API Manager 2.1.0 distribution (http://wso2.com/api-management/try-it/) +- Download the WSO2 API Manager 2.2.0 distribution (http://wso2.com/api-management/try-it/) and extract that in `/files` folder. - Once both JDK and WSO2 API Manager distributions are extracted the folder structure should be as follows; ```bash /files/jdk/ - /files/wso2am-2.1.0/ + /files/wso2am-2.2.0/ ``` - Download [MySQL Connector/J](https://dev.mysql.com/downloads/connector/j/) v5.1.45 and then copy that to `/files` folder @@ -34,10 +34,10 @@ in order to obtain latest bug fixes and updates for the product. ##### 3. Build the Docker image. - Navigate to `` directory.
Execute `docker build` command as shown below. - + `docker build -t wso2am:2.1.0 .` + + `docker build -t wso2am:2.2.0 .` ##### 4. Running the Docker image. -- `docker run -it -p 9443:9443 wso2am:2.1.0` +- `docker run -it -p 9443:9443 wso2am:2.2.0` ##### 6. Accessing management console. - To access the management console, use the docker host IP and port 9443. @@ -51,7 +51,7 @@ Configurations would lie on the Docker host machine and they can be volume mount As an example, steps required to change the port offset using `carbon.xml` is as follows. ##### 1. Stop the API Manager container if it's already running. -In WSO2 API Manager 2.1.0 product distribution, `carbon.xml` configuration file
+In WSO2 API Manager 2.2.0 product distribution, `carbon.xml` configuration file
can be found at `/repository/conf`. Copy the file to some suitable location of the host machine,
referred to as `/carbon.xml` and change the offset value under ports to 1. @@ -65,10 +65,10 @@ chmod o+r /carbon.xml docker run \ -p 9444:9444 \ --volume /carbon.xml:/carbon.xml \ -wso2am:2.1.0 +wso2am:2.2.0 ``` ->In here, refers to /home/wso2carbon/wso2am-2.1.0/repository/conf folder of the container. +>In here, refers to /home/wso2carbon/wso2am-2.2.0/repository/conf folder of the container. ## Docker command usage references diff --git a/dockerfiles/is-as-km/Dockerfile b/dockerfiles/is-as-km/Dockerfile index 3a412725..8f143b33 100644 --- a/dockerfiles/is-as-km/Dockerfile +++ b/dockerfiles/is-as-km/Dockerfile @@ -33,7 +33,7 @@ ARG JDK=jdk1.8.0* ARG JAVA_HOME=${USER_HOME}/java # set wso2 product configurations ARG WSO2_SERVER=wso2is-km -ARG WSO2_SERVER_VERSION=5.3.0 +ARG WSO2_SERVER_VERSION=5.5.0 ARG WSO2_SERVER_DIST=${WSO2_SERVER}-${WSO2_SERVER_VERSION} ARG WSO2_SERVER_HOME=${USER_HOME}/${WSO2_SERVER}-${WSO2_SERVER_VERSION} diff --git a/dockerfiles/is-as-km/README.md b/dockerfiles/is-as-km/README.md index 1dcb8c02..55d3a988 100644 --- a/dockerfiles/is-as-km/README.md +++ b/dockerfiles/is-as-km/README.md @@ -16,13 +16,13 @@ git clone https://github.com/wso2/docker-apim.git ##### 2. Add JDK, WSO2 API Manager distributions and MySQL connector to `/files` - Download [JDK 1.8](http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html) and extract that to `/files`. -- Download the WSO2 Identity Server as Key Manager 5.3.0 distribution (http://wso2.com/api-management/try-it/) +- Download the WSO2 Identity Server as Key Manager 5.5.0 distribution (http://wso2.com/api-management/try-it/) and extract that to `/files`.
- Once both JDK and WSO2 API Manager distributions are extracted the folder structure should be as follows; ```bash /files/jdk/ - /files/wso2is-km-5.3.0/ + /files/wso2is-km-5.5.0/ ``` - Download [MySQL Connector/J](https://dev.mysql.com/downloads/connector/j/) v5.1.45 and then copy that to `/files` folder @@ -32,10 +32,10 @@ in order to obtain latest bug fixes and updates for the product. ##### 3. Build the Docker image. - Navigate to `` directory.
Execute `docker build` command as shown below. - + `docker build -t wso2is-km:5.3.0 .` + + `docker build -t wso2is-km:5.5.0 .` ##### 4. Running the Docker image. -- `docker run -it -p 9443:9443 wso2is-km:5.3.0` +- `docker run -it -p 9443:9443 wso2is-km:5.5.0` ##### 5. Accessing management console. - To access the management console, use the docker host IP and port 9443. @@ -49,7 +49,7 @@ Configurations would lie on the Docker host machine and they can be volume mount As an example, steps required to change the port offset using `carbon.xml` is as follows. ##### 1. Stop the API Manager container if it's already running. -In WSO2 API Manager 2.1.0 product distribution, `carbon.xml` configuration file
+In WSO2 API Manager 2.2.0 product distribution, `carbon.xml` configuration file
can be found at `/repository/conf`. Copy the file to some suitable location of the host machine,
referred to as `/carbon.xml` and change the offset value under ports to 1. @@ -63,10 +63,10 @@ chmod o+r /carbon.xml docker run \ -p 9444:9444 \ --volume /carbon.xml:/carbon.xml \ -wso2is-km:5.3.0 +wso2is-km:5.5.0 ``` ->In here, refers to /home/wso2carbon/wso2is-km-5.3.0/repository/conf folder of the container. +>In here, refers to /home/wso2carbon/wso2is-km-5.5.0/repository/conf folder of the container. ## Docker command usage references diff --git a/dockerfiles/microgateway/Dockerfile b/dockerfiles/microgateway/Dockerfile new file mode 100644 index 00000000..5f776c70 --- /dev/null +++ b/dockerfiles/microgateway/Dockerfile @@ -0,0 +1,66 @@ +# ------------------------------------------------------------------------ +# +# Copyright 2017 WSO2, Inc. (http://wso2.com) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License +# +# ------------------------------------------------------------------------ + +# set to latest Ubuntu LTS +FROM ubuntu:16.04 +MAINTAINER WSO2 Docker Maintainers "dev@wso2.org" + +# set user configurations +ARG USER=wso2carbon +ARG USER_ID=802 +ARG USER_GROUP=wso2 +ARG USER_GROUP_ID=802 +ARG USER_HOME=/home/${USER} +# set dependant files directory +ARG FILES=./files +# set jdk configurations +ARG JDK=jdk1.8.0* +ARG JAVA_HOME=${USER_HOME}/java +# set wso2 product configurations +ARG WSO2_SERVER=wso2am-micro-gw +ARG WSO2_SERVER_VERSION=2.2.0 +ARG WSO2_SERVER_DIST=${WSO2_SERVER}-${WSO2_SERVER_VERSION} +ARG WSO2_SERVER_HOME=${USER_HOME}/${WSO2_SERVER}-${WSO2_SERVER_VERSION} + +# install required packages +RUN apt-get update && \ + DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends --no-install-suggests \ + curl && \ + rm -rf /var/lib/apt/lists/* + +# create a user group and a user +RUN groupadd --system -g ${USER_GROUP_ID} ${USER_GROUP} && \ + useradd --system --create-home --home-dir ${USER_HOME} --no-log-init -g ${USER_GROUP_ID} -u ${USER_ID} ${USER} + +# copy the jdk and wso2 product distributions to user's home directory and copy the mysql connector jar to server distribution +COPY --chown=wso2carbon:wso2 ${FILES}/${JDK} ${USER_HOME}/java/ +COPY --chown=wso2carbon:wso2 ${FILES}/${WSO2_SERVER_DIST} ${USER_HOME}/${WSO2_SERVER_DIST} + +# set the user and work directory +USER ${USER_ID} +WORKDIR ${USER_HOME} + +# set environment variables +ENV JAVA_HOME=${JAVA_HOME} \ + PATH=$JAVA_HOME/bin:$PATH \ + WSO2_SERVER_HOME=${WSO2_SERVER_HOME} + +# expose ports +EXPOSE 8243 + +ENTRYPOINT ${WSO2_SERVER_HOME}/bin/wso2server.sh diff --git a/dockerfiles/microgateway/README.md b/dockerfiles/microgateway/README.md new file mode 100644 index 00000000..ee06d110 --- /dev/null +++ b/dockerfiles/microgateway/README.md @@ -0,0 +1,79 @@ +# Dockerfile for WSO2 API Manager # +The section defines the step-by-step instructions to build the Docker image for WSO2 API Manager 2.2.0. + +## Prerequisites + +* [Docker](https://www.docker.com/get-docker) v17.09.0 or above + + +## How to build an image and run +##### 1. Checkout this repository into your local machine using the following git command. +``` +git clone https://github.com/wso2/docker-apim.git +``` + +>The local copy of the `dockerfile/apim` directory will be referred to as `AM_DOCKERFILE_HOME` from this point onwards. + +##### 2. Add JDK, WSO2 API Manager distributions and MySQL connector to `/files` +- Download [JDK 1.8](http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html) +and extract that in `/files` folder. +- Download the WSO2 API Manager 2.2.0 distribution (https://wso2.com/api-management/api-microgateway/#download-micro-api-gateway) +and extract that in `/files` folder. +- Once both JDK and WSO2 API Manager distributions are extracted the folder structure should be as follows; + + ```bash + /files/jdk/ + /files/wso2am-2.2.0/ + ``` +- Download [MySQL Connector/J](https://dev.mysql.com/downloads/connector/j/) v5.1.45 and then copy that to `/files` folder + + +>Please refer to [WSO2 Update Manager documentation](https://docs.wso2.com/display/ADMIN44x/Updating+WSO2+Products) +in order to obtain latest bug fixes and updates for the product. + +##### 3. Build the Docker image. +- Navigate to `` directory.
+ Execute `docker build` command as shown below. + + `docker build -t wso2am:2.2.0 .` + +##### 4. Running the Docker image. +- `docker run -it -p 8243:8243 wso2am:2.2.0` + +##### 6. Accessing management console. +- To access the management console, use the docker host IP and port 9443. + + `https::9443/carbon` + +>In here, refers to hostname or IP of the host machine on top of which containers are spawned. + + +## How to update configurations +Configurations would lie on the Docker host machine and they can be volume mounted to the container.
+As an example, steps required to change the port offset using `carbon.xml` is as follows. + +##### 1. Stop the API Manager container if it's already running. +In WSO2 API Manager 2.2.0 product distribution, `carbon.xml` configuration file
+can be found at `/repository/conf`. Copy the file to some suitable location of the host machine,
+referred to as `/carbon.xml` and change the offset value under ports to 1. + +##### 2. Grant read permission to `other` users for `/carbon.xml` +``` +chmod o+r /carbon.xml +``` + +##### 3. Run the image by mounting the file to container as follows. +``` +docker run \ +-p 8244:8244 \ +--volume /carbon.xml:/carbon.xml \ +wso2am:2.2.0 +``` + +>In here, refers to /home/wso2carbon/wso2am-2.2.0/repository/conf folder of the container. + + +## Docker command usage references + +* [Docker build command reference](https://docs.docker.com/engine/reference/commandline/build/) +* [Docker run command reference](https://docs.docker.com/engine/reference/run/) +* [Dockerfile reference](https://docs.docker.com/engine/reference/builder/) +#TODO fix READme \ No newline at end of file From 6152c889576c687aa8f8ef76651e381a69e00f8f Mon Sep 17 00:00:00 2001 From: ThilinaManamgoda Date: Thu, 5 Apr 2018 17:31:05 +0530 Subject: [PATCH 2/4] remove deployment json --- .../apim/repository/conf/api-manager.xml | 2 +- .../apim/repository/conf/axis2/axis2.xml | 2 +- .../jaggeryapps/portal/configs/designer.json | 66 ------------------- .../docker-compose.yml | 7 +- 4 files changed, 5 insertions(+), 72 deletions(-) delete mode 100644 docker-compose/APIM-ISasKM-with-Analytics/apim/repository/deployment/server/jaggeryapps/portal/configs/designer.json diff --git a/docker-compose/APIM-ISasKM-with-Analytics/apim/repository/conf/api-manager.xml b/docker-compose/APIM-ISasKM-with-Analytics/apim/repository/conf/api-manager.xml index 674a7358..90a66ef2 100755 --- a/docker-compose/APIM-ISasKM-with-Analytics/apim/repository/conf/api-manager.xml +++ b/docker-compose/APIM-ISasKM-with-Analytics/apim/repository/conf/api-manager.xml @@ -223,7 +223,7 @@ -If you need to start two API Manager instances in the same machine, you need to give different ports to "ThriftServerPort" value in two nodes. -ThriftServerHost - Allows to configure a hostname for the thrift server. It uses the carbon hostname by default. -The Gateway uses this parameter to connect to the key validation thrift service. --> - ThriftClient + WSClient 10000 diff --git a/docker-compose/APIM-ISasKM-with-Analytics/apim/repository/conf/axis2/axis2.xml b/docker-compose/APIM-ISasKM-with-Analytics/apim/repository/conf/axis2/axis2.xml index 4cbe17c0..80da46de 100644 --- a/docker-compose/APIM-ISasKM-with-Analytics/apim/repository/conf/axis2/axis2.xml +++ b/docker-compose/APIM-ISasKM-with-Analytics/apim/repository/conf/axis2/axis2.xml @@ -556,7 +556,7 @@ repository/resources/security/sslprofiles.xml 600000 - + AllowAll diff --git a/docker-compose/APIM-ISasKM-with-Analytics/apim/repository/deployment/server/jaggeryapps/portal/configs/designer.json b/docker-compose/APIM-ISasKM-with-Analytics/apim/repository/deployment/server/jaggeryapps/portal/configs/designer.json deleted file mode 100644 index a76a0c62..00000000 --- a/docker-compose/APIM-ISasKM-with-Analytics/apim/repository/deployment/server/jaggeryapps/portal/configs/designer.json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "store": { - "types": ["fs"] - }, - "gadgetGeneration" :{ - "isCreateGadgetEnable": false, - "ignoreProviders": ["rt"] - }, - "authentication": { - "activeMethod": "basic", - "methods": { - "sso": { - "attributes": { - "issuer": "portal", - "identityProviderURL": "https://localhost:9443/samlsso", - "responseSigningEnabled": "false", - "acs": "https://localhost:9444/portal/acs", - "identityAlias": "wso2carbon", - "useTenantKey": false - } - }, - "basic": { - "attributes": {} - } - } - }, - "authorization": { - "activeMethod": "", - "methods": { - "oauth": { - "attributes": { - "idPServer": "%https.ip%/oauth2/token", - "dynamicClientProperties": { - "callbackUrl": "%https.ip%/portal", - "clientName": "portal", - "owner": "admin", - "applicationType": "JaggeryApp", - "grantType": "password refresh_token urn:ietf:params:oauth:grant-type:saml2-bearer", - "saasApp": false, - "dynamicClientRegistrationEndPoint": "%https.ip%/dynamic-client-web/register/", - "tokenScope": "Production" - } - } - } - } - }, - "designers": [ - "Internal/everyone" - ], - "tenantPrefix": "/t", - "shareStore": false, - "theme": "basic", - "cacheTimeoutSeconds": "5", - "cacheSizeBytes": "1073741824", - "defaultDashboardRedirect": false, - "isCreateGadgetEnable": true, - "oauth": { - "username": "admin", - "password": "admin" - }, - "host": { - "hostname": "am-analytics", - "port": "", - "protocol": "" - } -} \ No newline at end of file diff --git a/docker-compose/APIM-ISasKM-with-Analytics/docker-compose.yml b/docker-compose/APIM-ISasKM-with-Analytics/docker-compose.yml index ac90fd57..4b28bd57 100755 --- a/docker-compose/APIM-ISasKM-with-Analytics/docker-compose.yml +++ b/docker-compose/APIM-ISasKM-with-Analytics/docker-compose.yml @@ -15,7 +15,7 @@ services: timeout: 60s retries: 5 am-analytics: - image: wso2am-analytics:2.2.0 + image: docker.wso2.com/wso2am-analytics:2.2.0 ports: - "9444:9444" - "9764:9764" @@ -34,7 +34,7 @@ services: links: - mysql is-as-km: - image: wso2is-km:5.5.0 + image: docker.wso2.com/wso2is-km:5.5.0 healthcheck: test: ["CMD", "curl", "-k", "-f", "https://localhost:9443/carbon/admin/login.jsp"] interval: 10s @@ -58,7 +58,7 @@ services: - mysql - am-analytics api-manager: - image: wso2am:2.2.0 + image: docker.wso2.com/wso2am:2.2.0 healthcheck: test: ["CMD", "curl", "-k", "-f", "https://localhost:9443/carbon/admin/login.jsp"] interval: 10s @@ -80,7 +80,6 @@ services: - ./apim/repository/conf/tomcat/catalina-server.xml:/home/wso2carbon/wso2am-2.2.0/repository/conf/tomcat/catalina-server.xml - ./apim/repository/conf/axis2/axis2.xml:/home/wso2carbon/wso2am-2.2.0/repository/conf/axis2/axis2.xml - ./apim/bin/wso2server.sh:/home/wso2carbon/wso2am-2.2.0/bin/wso2server.sh - - ./apim/repository/deployment/server/jaggeryapps/portal/configs/designer.json:/home/wso2carbon/wso2am-2.2.0/repository/deployment/server/jaggeryapps/portal/configs/designer.json ports: - "9763:9763" - "9443:9443" From f76a0c348d40cdcb155f2c3a9ba6b3924f2e9269 Mon Sep 17 00:00:00 2001 From: ThilinaManamgoda Date: Thu, 5 Apr 2018 18:13:29 +0530 Subject: [PATCH 3/4] Analytics with APIM pattern --- .../APIM-ISasKM-with-Analytics/README.md | 4 +- .../apim/repository/conf/axis2/axis2.xml | 4 +- docker-compose/APIM-with-Analytics/README.md | 4 +- .../apim/repository/conf/api-manager.xml | 112 ++--- .../apim/repository/conf/carbon.xml | 14 +- .../apim/repository/conf/log4j.properties | 220 ---------- .../jaggeryapps/portal/configs/designer.json | 66 --- .../APIM-with-Analytics/docker-compose.yml | 20 +- .../mysql/scripts/apim_mysql5.7.sql | 412 ++++++++++++++---- .../mysql/scripts/carbon_mysql5.7.sql | 13 + 10 files changed, 393 insertions(+), 476 deletions(-) delete mode 100644 docker-compose/APIM-with-Analytics/apim/repository/conf/log4j.properties delete mode 100644 docker-compose/APIM-with-Analytics/apim/repository/deployment/server/jaggeryapps/portal/configs/designer.json diff --git a/docker-compose/APIM-ISasKM-with-Analytics/README.md b/docker-compose/APIM-ISasKM-with-Analytics/README.md index cce7a7d2..e7c13a6a 100755 --- a/docker-compose/APIM-ISasKM-with-Analytics/README.md +++ b/docker-compose/APIM-ISasKM-with-Analytics/README.md @@ -7,10 +7,10 @@ in order to run the steps provided in following Quick start guide.

* In order to run this Docker Compose setup, you will need an active [Free Trial Subscription](https://wso2.com/free-trial-subscription) from WSO2 since the referring Docker images hosted at docker.wso2.com contains the latest updates and fixes for WSO2 API Manager
and - API Manager Analytics 2.1.0 and WSO2 Identity Server as KM 5.3.0. You can sign up for a Free Trial Subscription [here](https://wso2.com/free-trial-subscription).

+ API Manager Analytics 2.2.0 and WSO2 Identity Server as KM 5.3.0. You can sign up for a Free Trial Subscription [here](https://wso2.com/free-trial-subscription).

* If you wish to run the Docker Compose setup using Docker images built locally, build Docker images using
[WSO2 API Manager Dockerfile](../../dockerfiles/apim/README.md), [API Manager Analytics Dockerfile](../../dockerfiles/apim-analytics/README.md) and [WSO2 Identity Server as KM Dockerfile](../../dockerfiles/is-as-km/README.md) and remove the `docker.wso2.com/` prefix - from the `image` name In the `docker-compose.yml`. For example, change the line
`image: docker.wso2.com/wso2am:2.1.0` to `image: wso2am:2.1.0` .

+ from the `image` name In the `docker-compose.yml`. For example, change the line
`image: docker.wso2.com/wso2am:2.2.0` to `image: wso2am:2.2.0` .

## Quick Start Guide 1. Clone WSO2 API Manager Docker git repository. diff --git a/docker-compose/APIM-ISasKM-with-Analytics/apim/repository/conf/axis2/axis2.xml b/docker-compose/APIM-ISasKM-with-Analytics/apim/repository/conf/axis2/axis2.xml index 80da46de..c8146eb2 100644 --- a/docker-compose/APIM-ISasKM-with-Analytics/apim/repository/conf/axis2/axis2.xml +++ b/docker-compose/APIM-ISasKM-with-Analytics/apim/repository/conf/axis2/axis2.xml @@ -58,8 +58,8 @@ axis2modules - WSO2 AM 2.1.0 - WSO2 AM 2.1.0 + WSO2 AM 2.2.0 + WSO2 AM 2.2.0 diff --git a/docker-compose/APIM-with-Analytics/README.md b/docker-compose/APIM-with-Analytics/README.md index 88bc0e47..387ee19a 100755 --- a/docker-compose/APIM-with-Analytics/README.md +++ b/docker-compose/APIM-with-Analytics/README.md @@ -8,9 +8,9 @@ in order to run the steps provided in following Quick start guide.

* In order to run this Docker Compose setup, you will need an active [Free Trial Subscription](https://wso2.com/free-trial-subscription) from WSO2 since the referring Docker images hosted at docker.wso2.com contains the latest updates and fixes for WSO2 API Manager
and - API Manager Analytics 2.1.0 products. You can sign up for a Free Trial Subscription [here](https://wso2.com/free-trial-subscription).

+ API Manager Analytics 2.2.0 products. You can sign up for a Free Trial Subscription [here](https://wso2.com/free-trial-subscription).

* If you wish to run the Docker Compose setup using Docker images built locally, build Docker images using
[WSO2 API Manager Dockerfile](../../dockerfiles/apim/README.md) and [WSO2 API Manager Analytics Dockerfile](../../dockerfiles/apim-analytics/README.md) and remove `docker.wso2.com/` prefix from the `image` name in `docker-compose.yml`. - For example, change the line `image: docker.wso2.com/wso2am:2.1.0` to `image: wso2am:2.1.0`.
+ For example, change the line `image: docker.wso2.com/wso2am:2.2.0` to `image: wso2am:2.2.0`.

diff --git a/docker-compose/APIM-with-Analytics/apim/repository/conf/api-manager.xml b/docker-compose/APIM-with-Analytics/apim/repository/conf/api-manager.xml index 70bc8569..f7170bc2 100755 --- a/docker-compose/APIM-with-Analytics/apim/repository/conf/api-manager.xml +++ b/docker-compose/APIM-with-Analytics/apim/repository/conf/api-manager.xml @@ -56,8 +56,6 @@ Token generation the implementation is provided in URLSafeJWTGenerator --> - - ${admin.password} - http://api-manager:${http.nio.port},https://api-manager:${https.nio.port} + http://localhost:${http.nio.port},https://localhost:${https.nio.port} @@ -108,6 +106,15 @@ false + + true + + true @@ -190,7 +197,7 @@ org.wso2.analytics.apim.alertStakeholderInfo - 1.0.0 + 1.0.1 @@ -216,11 +223,11 @@ -If you need to start two API Manager instances in the same machine, you need to give different ports to "ThriftServerPort" value in two nodes. -ThriftServerHost - Allows to configure a hostname for the thrift server. It uses the carbon hostname by default. -The Gateway uses this parameter to connect to the key validation thrift service. --> - ThriftClient + WSClient 10000 - true + false localhost @@ -249,6 +256,8 @@ + + am_application_scope + false true false - https://api-manager/store + https://localhost:${mgt.transport.https.port}/store - https://api-manager:${mgt.transport.https.port}${carbon.context}services/ + https://localhost:${mgt.transport.https.port}${carbon.context}services/ ${admin.username} @@ -317,7 +327,7 @@ false - https://api-manager/publisher + https://localhost:${mgt.transport.https.port}/publisher + + true - - - - false - - - - - /resource - admin - 1.0.0 - none - none - Any - - - - - - - @@ -571,13 +543,15 @@ true - - true + Binary tcp://${carbon.local.ip}:${receiver.url.port} ssl://${carbon.local.ip}:${auth.url.port} ${admin.username} ${admin.password} + + + true 1000 200 @@ -589,6 +563,7 @@ + true https://localhost:${mgt.transport.https.port}${carbon.context}services/ ${admin.username} ${admin.password} @@ -600,32 +575,16 @@ true - tcp://${carbon.local.ip}:${jms.port} - ${admin.username} - ${admin.password} throttleData TopicConnectionFactory topic org.wso2.andes.jndi.PropertiesFileInitialContextFactory - amqp://${jms.username}:${jms.password}@clientid/carbon?brokerlist='${jms.url}' + amqp://${admin.username}:${admin.password}@clientid/carbon?brokerlist='tcp://${carbon.local.ip}:${jms.port}' - - 20 - 100 - 1000 - 10 - - - org.wso2.andes.jndi.PropertiesFileInitialContextFactory - repository/conf/jndi.properties - topic - throttleData - allow - TopicConnectionFactory - + + Supported Languages/Frameworks : android, java, scala, csharp, dart, flash, groovy, javascript, jmeter, + nodejs, perl, php, python, ruby, swift, clojure, asyncScala, csharpDotNet2--> java,android diff --git a/docker-compose/APIM-with-Analytics/apim/repository/conf/carbon.xml b/docker-compose/APIM-with-Analytics/apim/repository/conf/carbon.xml index 2e369a33..f0f9ba3a 100755 --- a/docker-compose/APIM-with-Analytics/apim/repository/conf/carbon.xml +++ b/docker-compose/APIM-with-Analytics/apim/repository/conf/carbon.xml @@ -1,6 +1,6 @@ - 2.1.0 + 2.2.0 - -