IDEMPIERE-5346 : Adding SSO support (#1571)

* IDEMPIERE-5346 : Adding SSO support

* IDEMPIERE-5346 : Fix as per peer review feedback.
Valid user should have password not null
removing #SSO_IS_ALREADY_AUTHENTICATE context variable due to security risk
Cross site scripting issue on error.htm
Making show role panel as system configurable
Adding language selection on role panel
Adding SSO support on iDempiere monitor and osgi console

* IDEMPIERE-5346: Redirect to console using static URL to avoid security vulenarabilit

* Committing patch from Carlos pr1571PR

* IDEMPIERE-5565: fixing NPE issue on Role change

* IDEMPIERE-5346: Appling pr1571PR2 from Carlos

* 1. IDEMPIERE-5346: Fix idempiereMonitor goes in a loop of sign-in
- Fix NPE when changing role
- Fix NPE when a user with single role & sysconfig: SSO_SELECT_ROLE is 'N'

* IDEMPIERE-5346 : IDempiere Monitor, use out of box login when SSO is not configured.

* IDEMPIERE-5346: Adding Authorization type on User and Tenant window. Created /webui/admin page for login with application credential.

* IDEMPIERE-5346: Implementing Hengsi's Code review comments
Showing meaning full error when Identity Provider returns error
In SSO filter, ignoreing css, zkau, images and resource URL
Correcting typo in Principal name.
Updated Documentation

* IDEMPIERE-5346 : Fixed documentation, typo and pending review comments

* IDEMPIERE-5346: Use token & SSO principal service to validate in Login.GetClient

* IDEMPIERE-5346: Remove the Domain URL column and refactor the code.

* IDEMPIERE-5346: Adding flag ENABLE_SSO_IDEMPIERE_MONITOR and ENABLE_SSO_OSGI_CONSOLE, using cache for SSOService, defaulting Authentication type on client to “Application and SSO”

* IDEMPIERE-5346: Fixed issue of User SSO type not respected and support for Zoom URL
This commit is contained in:
Deepak Pansheriya 2023-09-21 14:13:49 +05:30 committed by GitHub
parent db72625888
commit 680f9f3757
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
43 changed files with 3370 additions and 82 deletions

View File

@ -0,0 +1,476 @@
SET SQLBLANKLINES ON
SET DEFINE OFF
-- IDEMPIERE-5346 SSO Support
-- Sep 12, 2022, 4:25:30 PM IST
INSERT INTO AD_Table (AD_Table_ID,Name,TableName,LoadSeq,AccessLevel,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,IsSecurityEnabled,IsDeleteable,IsHighVolume,IsView,EntityType,ImportTable,IsChangeLog,ReplicationType,CopyColumnsFromTable,IsCentrallyMaintained,AD_Table_UU,Processing,DatabaseViewDrop,CopyComponentsFromView) VALUES (200360,'SSO Configuration','SSO_PrincipleConfig',0,'4',0,0,'Y',TO_DATE('2022-09-12 16:25:29','YYYY-MM-DD HH24:MI:SS'),100,TO_DATE('2022-09-12 16:25:29','YYYY-MM-DD HH24:MI:SS'),100,'N','Y','N','N','D','N','Y','L','N','Y','e7b0a0ee-c098-4705-a2b7-fdd90adc4e63','N','N','N')
;
-- Sep 12, 2022, 4:25:31 PM IST
INSERT INTO AD_Sequence (Name,CurrentNext,IsAudited,StartNewYear,Description,IsActive,IsTableID,AD_Client_ID,AD_Org_ID,Created,CreatedBy,Updated,UpdatedBy,AD_Sequence_ID,IsAutoSequence,StartNo,IncrementNo,CurrentNextSys,AD_Sequence_UU) VALUES ('SSO_PrincipleConfig',1000000,'N','N','Table SSO_PrincipleConfig','Y','Y',0,0,TO_DATE('2022-09-12 16:25:31','YYYY-MM-DD HH24:MI:SS'),100,TO_DATE('2022-09-12 16:25:31','YYYY-MM-DD HH24:MI:SS'),100,200428,'Y',1000000,1,200000,'f442cac2-0406-4e4d-a73f-159481fbf4ac')
;
-- Sep 12, 2022, 4:26:32 PM IST
INSERT INTO AD_Column (AD_Column_ID,Version,Name,Description,Help,AD_Table_ID,AD_Val_Rule_ID,ColumnName,DefaultValue,FieldLength,IsKey,IsParent,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsEncrypted,AD_Reference_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,AD_Element_ID,IsUpdateable,IsSelectionColumn,EntityType,IsSyncDatabase,IsAlwaysUpdateable,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsAllowCopy,SeqNoSelection,IsToolbarButton,IsSecure,FKConstraintType,IsHtml) VALUES (215286,0,'Client','Client/Tenant for this installation.','A Client is a company or a legal entity. You cannot share data between Clients. Tenant is a synonym for Client.',200360,129,'AD_Client_ID','@#AD_Client_ID@',22,'N','N','N','N','N',0,'N',19,0,0,'Y',TO_DATE('2022-09-12 16:26:31','YYYY-MM-DD HH24:MI:SS'),100,TO_DATE('2022-09-12 16:26:31','YYYY-MM-DD HH24:MI:SS'),100,102,'N','N','D','N','N','N','Y','9922436e-7736-4ac1-a2c6-d48810252c47','N',0,'N','N','D','N')
;
-- Sep 12, 2022, 4:26:51 PM IST
INSERT INTO AD_Column (AD_Column_ID,Version,Name,Description,Help,AD_Table_ID,AD_Val_Rule_ID,ColumnName,DefaultValue,FieldLength,IsKey,IsParent,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsEncrypted,AD_Reference_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,AD_Element_ID,IsUpdateable,IsSelectionColumn,EntityType,IsSyncDatabase,IsAlwaysUpdateable,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsAllowCopy,SeqNoSelection,IsToolbarButton,IsSecure,FKConstraintType,IsHtml) VALUES (215287,0,'Organization','Organizational entity within client','An organization is a unit of your client or legal entity - examples are store, department. You can share data between organizations.',200360,104,'AD_Org_ID','@#AD_Org_ID@',22,'N','N','N','N','N',0,'N',19,0,0,'Y',TO_DATE('2022-09-12 16:26:51','YYYY-MM-DD HH24:MI:SS'),100,TO_DATE('2022-09-12 16:26:51','YYYY-MM-DD HH24:MI:SS'),100,113,'N','N','D','N','N','N','Y','995c1647-2139-4ec2-b6b9-cb553314b7bc','N',0,'N','N','D','N')
;
-- Sep 12, 2022, 4:27:17 PM IST
INSERT INTO AD_Column (AD_Column_ID,Version,Name,Description,Help,AD_Table_ID,ColumnName,DefaultValue,FieldLength,IsKey,IsParent,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsEncrypted,AD_Reference_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,AD_Element_ID,IsUpdateable,IsSelectionColumn,EntityType,IsSyncDatabase,IsAlwaysUpdateable,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsAllowCopy,SeqNoSelection,IsToolbarButton,IsSecure,IsHtml) VALUES (215288,0,'Active','The record is active in the system','There are two methods of making records unavailable in the system: One is to delete the record, the other is to de-activate the record. A de-activated record is not available for selection, but available for reports.
There are two reasons for de-activating and not deleting records:
(1) The system requires the record for audit purposes.
(2) The record is referenced by other records. E.g., you cannot delete a Business Partner, if there are invoices for this partner record existing. You de-activate the Business Partner and prevent that this record is used for future entries.',200360,'IsActive','Y',1,'N','N','N','N','N',0,'N',20,0,0,'Y',TO_DATE('2022-09-12 16:27:16','YYYY-MM-DD HH24:MI:SS'),100,TO_DATE('2022-09-12 16:27:16','YYYY-MM-DD HH24:MI:SS'),100,348,'Y','N','D','N','N','N','Y','4b815b97-a447-4a19-8c0d-f4bc4139d1ee','N',0,'N','N','N')
;
-- Sep 12, 2022, 4:27:34 PM IST
INSERT INTO AD_Column (AD_Column_ID,Version,Name,Description,Help,AD_Table_ID,ColumnName,DefaultValue,FieldLength,IsKey,IsParent,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsEncrypted,AD_Reference_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,AD_Element_ID,IsUpdateable,IsSelectionColumn,EntityType,IsSyncDatabase,IsAlwaysUpdateable,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsAllowCopy,SeqNoSelection,IsToolbarButton,IsSecure,IsHtml) VALUES (215289,0,'Created','Date this record was created','The Created field indicates the date that this record was created.',200360,'Created','SYSDATE',7,'N','N','N','N','N',0,'N',16,0,0,'Y',TO_DATE('2022-09-12 16:27:33','YYYY-MM-DD HH24:MI:SS'),100,TO_DATE('2022-09-12 16:27:33','YYYY-MM-DD HH24:MI:SS'),100,245,'N','N','D','N','N','N','Y','722a2e9a-62cf-47e4-9656-0a9062f32f71','N',0,'N','N','N')
;
-- Sep 12, 2022, 4:27:45 PM IST
INSERT INTO AD_Column (AD_Column_ID,Version,Name,Description,Help,AD_Table_ID,ColumnName,FieldLength,IsKey,IsParent,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsEncrypted,AD_Reference_ID,AD_Reference_Value_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,AD_Element_ID,IsUpdateable,IsSelectionColumn,EntityType,IsSyncDatabase,IsAlwaysUpdateable,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsAllowCopy,SeqNoSelection,IsToolbarButton,IsSecure,FKConstraintType,IsHtml) VALUES (215290,0,'Created By','User who created this records','The Created By field indicates the user who created this record.',200360,'CreatedBy',22,'N','N','N','N','N',0,'N',18,110,0,0,'Y',TO_DATE('2022-09-12 16:27:44','YYYY-MM-DD HH24:MI:SS'),100,TO_DATE('2022-09-12 16:27:44','YYYY-MM-DD HH24:MI:SS'),100,246,'N','N','D','N','N','N','Y','80ad61ed-4304-4783-bf4f-eca0ccda90cc','N',0,'N','N','D','N')
;
-- Sep 12, 2022, 4:28:10 PM IST
INSERT INTO AD_Column (AD_Column_ID,Version,Name,Description,Help,AD_Table_ID,ColumnName,DefaultValue,FieldLength,IsKey,IsParent,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsEncrypted,AD_Reference_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,AD_Element_ID,IsUpdateable,IsSelectionColumn,EntityType,IsSyncDatabase,IsAlwaysUpdateable,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsAllowCopy,SeqNoSelection,IsToolbarButton,IsSecure,IsHtml) VALUES (215291,0,'Updated','Date this record was updated','The Updated field indicates the date that this record was updated.',200360,'Updated','SYSDATE',7,'N','N','N','N','N',0,'N',16,0,0,'Y',TO_DATE('2022-09-12 16:28:09','YYYY-MM-DD HH24:MI:SS'),100,TO_DATE('2022-09-12 16:28:09','YYYY-MM-DD HH24:MI:SS'),100,607,'N','N','D','N','N','N','Y','ae087404-e3a7-4eb8-8574-7aa0d1c5b03f','N',0,'N','N','N')
;
-- Sep 12, 2022, 4:28:20 PM IST
INSERT INTO AD_Column (AD_Column_ID,Version,Name,Description,Help,AD_Table_ID,ColumnName,FieldLength,IsKey,IsParent,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsEncrypted,AD_Reference_ID,AD_Reference_Value_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,AD_Element_ID,IsUpdateable,IsSelectionColumn,EntityType,IsSyncDatabase,IsAlwaysUpdateable,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsAllowCopy,SeqNoSelection,IsToolbarButton,IsSecure,FKConstraintType,IsHtml) VALUES (215292,0,'Updated By','User who updated this records','The Updated By field indicates the user who updated this record.',200360,'UpdatedBy',22,'N','N','N','N','N',0,'N',18,110,0,0,'Y',TO_DATE('2022-09-12 16:28:19','YYYY-MM-DD HH24:MI:SS'),100,TO_DATE('2022-09-12 16:28:19','YYYY-MM-DD HH24:MI:SS'),100,608,'N','N','D','N','N','N','Y','35c922af-4d62-43da-8a6f-1761f16fd6d3','N',0,'N','N','D','N')
;
-- Sep 12, 2022, 4:32:36 PM IST
INSERT INTO AD_Element (AD_Element_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,ColumnName,Name,PrintName,EntityType,AD_Element_UU) VALUES (203653,0,0,'Y',TO_DATE('2022-09-12 16:32:35','YYYY-MM-DD HH24:MI:SS'),100,TO_DATE('2022-09-12 16:32:35','YYYY-MM-DD HH24:MI:SS'),100,'SSO_PrincipleConfig_ID','SSO Configuration','SSO Configuration','D','425b9a47-7bb0-43a7-9229-80055b571c74')
;
-- Sep 12, 2022, 4:32:53 PM IST
INSERT INTO AD_Element (AD_Element_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,ColumnName,Name,PrintName,EntityType,AD_Element_UU) VALUES (203654,0,0,'Y',TO_DATE('2022-09-12 16:32:52','YYYY-MM-DD HH24:MI:SS'),100,TO_DATE('2022-09-12 16:32:52','YYYY-MM-DD HH24:MI:SS'),100,'SSO_PrincipleConfig_UU','SSO Configuration UU','SSO Configuration UU','D','c54393fb-1913-4660-9672-48f08f2a6026')
;
-- Sep 12, 2022, 4:36:00 PM IST
INSERT INTO AD_Column (AD_Column_ID,Version,Name,AD_Table_ID,ColumnName,FieldLength,IsKey,IsParent,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsEncrypted,AD_Reference_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,AD_Element_ID,IsUpdateable,IsSelectionColumn,EntityType,IsSyncDatabase,IsAlwaysUpdateable,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsAllowCopy,SeqNoSelection,IsToolbarButton,IsSecure,FKConstraintType,IsHtml) VALUES (215294,0,'SSO Configuration UU',200360,'SSO_PrincipleConfig_UU',36,'N','N','N','N','N',0,'N',10,0,0,'Y',TO_DATE('2022-09-12 16:36:00','YYYY-MM-DD HH24:MI:SS'),100,TO_DATE('2022-09-12 16:36:00','YYYY-MM-DD HH24:MI:SS'),100,203654,'N','N','D','N','N','N','Y','29915d20-0fb9-4548-8821-02bf067c7fc8','N',0,'N','N','N','N')
;
-- Sep 12, 2022, 4:39:26 PM IST
INSERT INTO AD_Column (AD_Column_ID,Version,Name,Description,Help,AD_Table_ID,ColumnName,FieldLength,IsKey,IsParent,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsEncrypted,AD_Reference_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,AD_Element_ID,IsUpdateable,IsSelectionColumn,EntityType,IsSyncDatabase,IsAlwaysUpdateable,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsAllowCopy,SeqNoSelection,IsToolbarButton,IsSecure,IsHtml) VALUES (215296,0,'Name','Alphanumeric identifier of the entity','The name of an entity (record) is used as an default search option in addition to the search key. The name is up to 60 characters in length.',200360,'Name',60,'N','N','N','N','Y',0,'N',10,0,0,'Y',TO_DATE('2022-09-12 16:39:25','YYYY-MM-DD HH24:MI:SS'),100,TO_DATE('2022-09-12 16:39:25','YYYY-MM-DD HH24:MI:SS'),100,469,'Y','Y','D','N','N','N','Y','9d805126-1dbd-4379-b4ba-e83d9e84112d','Y',20,'N','N','N')
;
-- Sep 12, 2022, 4:42:57 PM IST
INSERT INTO AD_Element (AD_Element_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,ColumnName,Name,Description,PrintName,EntityType,AD_Element_UU) VALUES (203655,0,0,'Y',TO_DATE('2022-09-12 16:42:56','YYYY-MM-DD HH24:MI:SS'),100,TO_DATE('2022-09-12 16:42:56','YYYY-MM-DD HH24:MI:SS'),100,'SSO_AuthorizationTenantID','Tenant ID','SSO Tenant ID','Tenant ID','D','3d476f0b-fc9a-41fe-a934-708ff7b09924')
;
-- Sep 12, 2022, 4:43:57 PM IST
INSERT INTO AD_Column (AD_Column_ID,Version,Name,Description,AD_Table_ID,ColumnName,FieldLength,IsKey,IsParent,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsEncrypted,AD_Reference_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,AD_Element_ID,IsUpdateable,IsSelectionColumn,EntityType,IsSyncDatabase,IsAlwaysUpdateable,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsAllowCopy,SeqNoSelection,IsToolbarButton,IsSecure,FKConstraintType,IsHtml) VALUES (215297,0,'Tenant ID','SSO Tenant ID',200360,'SSO_AuthorizationTenantID',100,'N','N','N','N','N',0,'N',10,0,0,'Y',TO_DATE('2022-09-12 16:43:56','YYYY-MM-DD HH24:MI:SS'),100,TO_DATE('2022-09-12 16:43:56','YYYY-MM-DD HH24:MI:SS'),100,203655,'Y','N','D','N','N','N','N','2e32c2c9-c933-4531-85b8-9fcd5e32cb00','N',0,'N','N','N','N')
;
-- Sep 12, 2022, 4:45:14 PM IST
INSERT INTO AD_Element (AD_Element_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,ColumnName,Name,Description,PrintName,EntityType,AD_Element_UU) VALUES (203656,0,0,'Y',TO_DATE('2022-09-12 16:45:13','YYYY-MM-DD HH24:MI:SS'),100,TO_DATE('2022-09-12 16:45:13','YYYY-MM-DD HH24:MI:SS'),100,'SSO_ApplicationClientID','Application Client ID','SSO Application Client ID','Application Client ID','D','3747d76d-0432-4981-a8d4-b35b26903ad1')
;
-- Sep 12, 2022, 4:45:58 PM IST
INSERT INTO AD_Column (AD_Column_ID,Version,Name,Description,AD_Table_ID,ColumnName,FieldLength,IsKey,IsParent,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsEncrypted,AD_Reference_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,AD_Element_ID,IsUpdateable,IsSelectionColumn,EntityType,IsSyncDatabase,IsAlwaysUpdateable,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsAllowCopy,SeqNoSelection,IsToolbarButton,IsSecure,FKConstraintType,IsHtml) VALUES (215298,0,'Application Client ID','SSO Application Client ID',200360,'SSO_ApplicationClientID',100,'N','N','N','N','N',0,'N',10,0,0,'Y',TO_DATE('2022-09-12 16:45:57','YYYY-MM-DD HH24:MI:SS'),100,TO_DATE('2022-09-12 16:45:57','YYYY-MM-DD HH24:MI:SS'),100,203656,'Y','N','D','N','Y','N','N','39975d3e-0a1f-407f-9067-50f7dcfb6bef','N',0,'N','N','N','N')
;
-- Sep 12, 2022, 4:47:18 PM IST
INSERT INTO AD_Element (AD_Element_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,ColumnName,Name,Description,PrintName,EntityType,AD_Element_UU) VALUES (203657,0,0,'Y',TO_DATE('2022-09-12 16:47:17','YYYY-MM-DD HH24:MI:SS'),100,TO_DATE('2022-09-12 16:47:17','YYYY-MM-DD HH24:MI:SS'),100,'SSO_ApplicationSecretKey','Application Secret Key','SSO Application Secret Key','Application Secret Key','D','d5dd4ee2-f12b-46e3-a972-d8f2731bc540')
;
-- Sep 12, 2022, 4:48:17 PM IST
UPDATE AD_Column SET IsMandatory='Y',Updated=TO_DATE('2022-09-12 16:48:17','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=215298
;
-- Sep 12, 2022, 4:48:48 PM IST
UPDATE AD_Column SET IsMandatory='Y',Updated=TO_DATE('2022-09-12 16:48:48','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=215297
;
-- Sep 12, 2022, 4:51:27 PM IST
INSERT INTO AD_Element (AD_Element_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,ColumnName,Name,Description,PrintName,EntityType,AD_Element_UU) VALUES (203658,0,0,'Y',TO_DATE('2022-09-12 16:51:27','YYYY-MM-DD HH24:MI:SS'),100,TO_DATE('2022-09-12 16:51:27','YYYY-MM-DD HH24:MI:SS'),100,'SSO_ApplicationRedirectURIs','Application Redirect URIs','SSO Application Redirect URIs','Application Redirect URIs','D','b2c0bcba-10c2-4a81-bcec-84f9d6c3522c')
;
-- Sep 12, 2022, 4:52:05 PM IST
INSERT INTO AD_Column (AD_Column_ID,Version,Name,Description,AD_Table_ID,ColumnName,FieldLength,IsKey,IsParent,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsEncrypted,AD_Reference_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,AD_Element_ID,IsUpdateable,IsSelectionColumn,EntityType,IsSyncDatabase,IsAlwaysUpdateable,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsAllowCopy,SeqNoSelection,IsToolbarButton,IsSecure,FKConstraintType,IsHtml) VALUES (215300,0,'Application Redirect URIs','SSO Application Redirect URIs',200360,'SSO_ApplicationRedirectURIs',1000,'N','N','N','N','N',0,'N',10,0,0,'Y',TO_DATE('2022-09-12 16:52:04','YYYY-MM-DD HH24:MI:SS'),100,TO_DATE('2022-09-12 16:52:04','YYYY-MM-DD HH24:MI:SS'),100,203658,'Y','N','D','N','Y','N','N','d407ac13-80ef-4af8-92eb-343f63ea13fc','N',0,'N','N','N','N')
;
-- Sep 12, 2022, 4:54:54 PM IST
INSERT INTO AD_Element (AD_Element_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,ColumnName,Name,Description,PrintName,EntityType,AD_Element_UU) VALUES (203659,0,0,'Y',TO_DATE('2022-09-12 16:54:53','YYYY-MM-DD HH24:MI:SS'),100,TO_DATE('2022-09-12 16:54:53','YYYY-MM-DD HH24:MI:SS'),100,'SSO_ApplicationLogoutURL','Application Logout URL','SSO Application Logout URL','Application Logout URL','D','343fd50a-b2cb-4e0c-ae61-ecc45c40bbca')
;
-- Sep 12, 2022, 4:56:02 PM IST
INSERT INTO AD_Column (AD_Column_ID,Version,Name,Description,AD_Table_ID,ColumnName,FieldLength,IsKey,IsParent,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsEncrypted,AD_Reference_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,AD_Element_ID,IsUpdateable,IsSelectionColumn,EntityType,IsSyncDatabase,IsAlwaysUpdateable,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsAllowCopy,SeqNoSelection,IsToolbarButton,IsSecure,FKConstraintType,IsHtml) VALUES (215301,0,'Application Logout URL','SSO Application Logout URL',200360,'SSO_ApplicationLogoutURL',1000,'N','N','N','N','N',0,'N',10,0,0,'Y',TO_DATE('2022-09-12 16:56:01','YYYY-MM-DD HH24:MI:SS'),100,TO_DATE('2022-09-12 16:56:01','YYYY-MM-DD HH24:MI:SS'),100,203659,'Y','N','D','N','Y','N','N','c24bd056-beca-4fb6-ae85-660115478486','N',0,'N','N','N','N')
;
-- Sep 12, 2022, 5:03:36 PM IST
INSERT INTO AD_Window (AD_Window_ID,Name,Description,Help,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,WindowType,Processing,EntityType,IsSOTrx,IsDefault,WinHeight,WinWidth,IsBetaFunctionality,AD_Window_UU) VALUES (200132,'SSO Configuration','Single sign-on Configuration','Single sign-on is an authentication scheme that allows a user to log in with a single ID to any of several related, yet independent, software systems.',0,0,'Y',TO_DATE('2022-09-12 17:03:35','YYYY-MM-DD HH24:MI:SS'),100,TO_DATE('2022-09-12 17:03:35','YYYY-MM-DD HH24:MI:SS'),100,'M','N','D','Y','N',0,0,'N','60c3edde-af29-44d9-bc0c-9dab28f5dc32')
;
-- Sep 12, 2022, 5:04:09 PM IST
INSERT INTO AD_Tab (AD_Tab_ID,Name,AD_Window_ID,SeqNo,IsSingleRow,AD_Table_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,HasTree,IsInfoTab,IsTranslationTab,IsReadOnly,Processing,ImportFields,TabLevel,IsSortTab,EntityType,IsInsertRecord,IsAdvancedTab,AD_Tab_UU,TreeDisplayedOn,IsLookupOnlySelection,IsAllowAdvancedLookup,MaxQueryRecords) VALUES (200328,'SSO Configuration',200132,10,'Y',200360,0,0,'Y',TO_DATE('2022-09-12 17:04:08','YYYY-MM-DD HH24:MI:SS'),100,TO_DATE('2022-09-12 17:04:08','YYYY-MM-DD HH24:MI:SS'),100,'N','N','N','N','N','N',0,'N','D','Y','N','29ac2590-d681-4a3e-8b04-caf5269dda86','B','N','Y',0)
;
-- Sep 12, 2022, 5:04:22 PM IST
INSERT INTO AD_Field (AD_Field_ID,Name,Description,Help,AD_Tab_ID,AD_Column_ID,IsDisplayed,DisplayLength,SeqNo,IsSameLine,IsHeading,IsFieldOnly,IsEncrypted,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,IsReadOnly,IsCentrallyMaintained,EntityType,AD_Field_UU,IsDisplayedGrid,ColumnSpan) VALUES (207191,'Client','Client/Tenant for this installation.','A Client is a company or a legal entity. You cannot share data between Clients. Tenant is a synonym for Client.',200328,215286,'Y',22,10,'N','N','N','N',0,0,'Y',TO_DATE('2022-09-12 17:04:21','YYYY-MM-DD HH24:MI:SS'),100,TO_DATE('2022-09-12 17:04:21','YYYY-MM-DD HH24:MI:SS'),100,'N','Y','D','6b76faa4-3d47-460c-b6a9-be25ee42157f','N',2)
;
-- Sep 12, 2022, 5:04:22 PM IST
INSERT INTO AD_Field (AD_Field_ID,Name,Description,Help,AD_Tab_ID,AD_Column_ID,IsDisplayed,DisplayLength,SeqNo,IsSameLine,IsHeading,IsFieldOnly,IsEncrypted,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,IsReadOnly,IsCentrallyMaintained,EntityType,AD_Field_UU,IsAllowCopy,IsDisplayedGrid,XPosition,ColumnSpan) VALUES (207192,'Organization','Organizational entity within client','An organization is a unit of your client or legal entity - examples are store, department. You can share data between organizations.',200328,215287,'Y',22,20,'N','N','N','N',0,0,'Y',TO_DATE('2022-09-12 17:04:22','YYYY-MM-DD HH24:MI:SS'),100,TO_DATE('2022-09-12 17:04:22','YYYY-MM-DD HH24:MI:SS'),100,'N','Y','D','68d8d75d-7d18-47b3-86c1-9146bfeb5bb2','Y','N',4,2)
;
-- Sep 12, 2022, 5:04:24 PM IST
INSERT INTO AD_Field (AD_Field_ID,Name,Description,Help,AD_Tab_ID,AD_Column_ID,IsDisplayed,DisplayLength,SeqNo,IsSameLine,IsHeading,IsFieldOnly,IsEncrypted,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,IsReadOnly,IsCentrallyMaintained,EntityType,AD_Field_UU,IsDisplayedGrid,SeqNoGrid,ColumnSpan) VALUES (207194,'Name','Alphanumeric identifier of the entity','The name of an entity (record) is used as an default search option in addition to the search key. The name is up to 60 characters in length.',200328,215296,'Y',60,40,'N','N','N','N',0,0,'Y',TO_DATE('2022-09-12 17:04:23','YYYY-MM-DD HH24:MI:SS'),100,TO_DATE('2022-09-12 17:04:23','YYYY-MM-DD HH24:MI:SS'),100,'N','Y','D','bf3c6b23-a1de-4c0a-afe8-81aa42826d5c','Y',20,5)
;
-- Sep 12, 2022, 5:04:25 PM IST
INSERT INTO AD_Field (AD_Field_ID,Name,AD_Tab_ID,AD_Column_ID,IsDisplayed,DisplayLength,SeqNo,IsSameLine,IsHeading,IsFieldOnly,IsEncrypted,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,IsReadOnly,IsCentrallyMaintained,EntityType,AD_Field_UU,IsDisplayedGrid,SeqNoGrid,ColumnSpan) VALUES (207195,'SSO Configuration UU',200328,215294,'Y',36,50,'N','N','N','N',0,0,'Y',TO_DATE('2022-09-12 17:04:24','YYYY-MM-DD HH24:MI:SS'),100,TO_DATE('2022-09-12 17:04:24','YYYY-MM-DD HH24:MI:SS'),100,'N','Y','D','d2d7b7a8-2d3a-473e-b4c9-6081967b65c1','Y',30,2)
;
-- Sep 12, 2022, 5:04:25 PM IST
INSERT INTO AD_Field (AD_Field_ID,Name,Description,AD_Tab_ID,AD_Column_ID,IsDisplayed,DisplayLength,SeqNo,IsSameLine,IsHeading,IsFieldOnly,IsEncrypted,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,IsReadOnly,IsCentrallyMaintained,EntityType,AD_Field_UU,IsDisplayedGrid,SeqNoGrid,ColumnSpan) VALUES (207196,'Tenant ID','SSO Tenant ID',200328,215297,'Y',100,60,'N','N','N','N',0,0,'Y',TO_DATE('2022-09-12 17:04:25','YYYY-MM-DD HH24:MI:SS'),100,TO_DATE('2022-09-12 17:04:25','YYYY-MM-DD HH24:MI:SS'),100,'N','Y','D','87c18271-db99-413d-80a7-8a0e78484e0d','Y',40,5)
;
-- Sep 12, 2022, 5:04:26 PM IST
INSERT INTO AD_Field (AD_Field_ID,Name,Description,AD_Tab_ID,AD_Column_ID,IsDisplayed,DisplayLength,SeqNo,IsSameLine,IsHeading,IsFieldOnly,IsEncrypted,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,IsReadOnly,IsCentrallyMaintained,EntityType,AD_Field_UU,IsDisplayedGrid,SeqNoGrid,ColumnSpan) VALUES (207197,'Application Client ID','SSO Application Client ID',200328,215298,'Y',100,70,'N','N','N','N',0,0,'Y',TO_DATE('2022-09-12 17:04:25','YYYY-MM-DD HH24:MI:SS'),100,TO_DATE('2022-09-12 17:04:25','YYYY-MM-DD HH24:MI:SS'),100,'N','Y','D','fe330472-2b33-4ba4-b162-c375d569cda1','Y',50,5)
;
-- Sep 12, 2022, 5:04:27 PM IST
INSERT INTO AD_Field (AD_Field_ID,Name,Description,AD_Tab_ID,AD_Column_ID,IsDisplayed,DisplayLength,SeqNo,IsSameLine,IsHeading,IsFieldOnly,IsEncrypted,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,IsReadOnly,IsCentrallyMaintained,EntityType,AD_Field_UU,IsDisplayedGrid,SeqNoGrid,ColumnSpan) VALUES (207198,'Application Redirect URIs','SSO Application Redirect URIs',200328,215300,'Y',1000,80,'N','N','N','N',0,0,'Y',TO_DATE('2022-09-12 17:04:26','YYYY-MM-DD HH24:MI:SS'),100,TO_DATE('2022-09-12 17:04:26','YYYY-MM-DD HH24:MI:SS'),100,'N','Y','D','bc2ba7bc-d194-42de-83f7-6ae40e659436','Y',60,5)
;
-- Sep 12, 2022, 5:04:27 PM IST
INSERT INTO AD_Field (AD_Field_ID,Name,Description,AD_Tab_ID,AD_Column_ID,IsDisplayed,DisplayLength,SeqNo,IsSameLine,IsHeading,IsFieldOnly,IsEncrypted,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,IsReadOnly,IsCentrallyMaintained,EntityType,AD_Field_UU,IsDisplayedGrid,SeqNoGrid,ColumnSpan) VALUES (207199,'Application Logout URL','SSO Application Logout URL',200328,215301,'Y',1000,90,'N','N','N','N',0,0,'Y',TO_DATE('2022-09-12 17:04:27','YYYY-MM-DD HH24:MI:SS'),100,TO_DATE('2022-09-12 17:04:27','YYYY-MM-DD HH24:MI:SS'),100,'N','Y','D','266b349b-5040-4e62-a2bd-12cc8d1b26a5','Y',70,5)
;
-- Sep 12, 2022, 5:04:28 PM IST
INSERT INTO AD_Field (AD_Field_ID,Name,Description,Help,AD_Tab_ID,AD_Column_ID,IsDisplayed,DisplayLength,SeqNo,IsSameLine,IsHeading,IsFieldOnly,IsEncrypted,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,IsReadOnly,IsCentrallyMaintained,EntityType,AD_Field_UU,IsDisplayedGrid,SeqNoGrid,XPosition,ColumnSpan) VALUES (207200,'Active','The record is active in the system','There are two methods of making records unavailable in the system: One is to delete the record, the other is to de-activate the record. A de-activated record is not available for selection, but available for reports.
There are two reasons for de-activating and not deleting records:
(1) The system requires the record for audit purposes.
(2) The record is referenced by other records. E.g., you cannot delete a Business Partner, if there are invoices for this partner record existing. You de-activate the Business Partner and prevent that this record is used for future entries.',200328,215288,'Y',1,100,'N','N','N','N',0,0,'Y',TO_DATE('2022-09-12 17:04:27','YYYY-MM-DD HH24:MI:SS'),100,TO_DATE('2022-09-12 17:04:27','YYYY-MM-DD HH24:MI:SS'),100,'N','Y','D','665490df-8b3d-4e40-a9f2-659e3e9ead95','Y',80,2,2)
;
-- Sep 12, 2022, 5:06:28 PM IST
INSERT INTO AD_Column (AD_Column_ID,Version,Name,Description,AD_Table_ID,ColumnName,FieldLength,IsKey,IsParent,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsEncrypted,AD_Reference_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,AD_Element_ID,IsUpdateable,IsSelectionColumn,EntityType,IsSyncDatabase,IsAlwaysUpdateable,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsAllowCopy,SeqNoSelection,IsToolbarButton,IsSecure,IsHtml) VALUES (215302,0,'Application Secret Key','SSO Application Secret Key',200360,'SSO_ApplicationSecretKey',100,'N','N','N','N','N',0,'N',10,0,0,'Y',TO_DATE('2022-09-12 17:06:28','YYYY-MM-DD HH24:MI:SS'),100,TO_DATE('2022-09-12 17:06:28','YYYY-MM-DD HH24:MI:SS'),100,203657,'Y','N','D','N','N','N','N','a1c453e1-42f2-4131-810a-3e9f6ea6c81e','N',0,'N','Y','N')
;
-- Sep 12, 2022, 5:06:35 PM IST
CREATE TABLE SSO_PrincipleConfig (AD_Client_ID NUMBER(10) DEFAULT NULL , AD_Org_ID NUMBER(10) DEFAULT NULL , Created DATE DEFAULT SYSDATE, CreatedBy NUMBER(10) DEFAULT NULL , IsActive CHAR(1) DEFAULT 'Y' CHECK (IsActive IN ('Y','N')), Name VARCHAR2(60 CHAR) DEFAULT NULL , SSO_ApplicationClientID VARCHAR2(100 CHAR) NOT NULL, SSO_ApplicationLogoutURL VARCHAR2(1000 CHAR) DEFAULT NULL , SSO_ApplicationRedirectURIs VARCHAR2(1000 CHAR) DEFAULT NULL , SSO_ApplicationSecretKey VARCHAR2(100 CHAR) DEFAULT NULL , SSO_AuthorizationTenantID VARCHAR2(100 CHAR) NOT NULL, SSO_PrincipleConfig_ID NUMBER(10) DEFAULT NULL , SSO_PrincipleConfig_UU VARCHAR2(36 CHAR) DEFAULT NULL , Updated DATE DEFAULT SYSDATE, UpdatedBy NUMBER(10) DEFAULT NULL , CONSTRAINT SSO_PrincipleConfig_Key PRIMARY KEY (SSO_PrincipleConfig_ID), CONSTRAINT SSO_PrincipleConfig_UU_idx UNIQUE (SSO_PrincipleConfig_UU))
;
-- Sep 12, 2022, 5:06:51 PM IST
INSERT INTO AD_Field (AD_Field_ID,Name,Description,AD_Tab_ID,AD_Column_ID,IsDisplayed,DisplayLength,SeqNo,IsSameLine,IsHeading,IsFieldOnly,IsEncrypted,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,IsReadOnly,IsCentrallyMaintained,EntityType,AD_Field_UU,IsDisplayedGrid,SeqNoGrid,ColumnSpan) VALUES (207201,'Application Secret Key','SSO Application Secret Key',200328,215302,'Y',100,110,'N','N','N','N',0,0,'Y',TO_DATE('2022-09-12 17:06:50','YYYY-MM-DD HH24:MI:SS'),100,TO_DATE('2022-09-12 17:06:50','YYYY-MM-DD HH24:MI:SS'),100,'N','Y','D','fbb79fdd-d901-4376-b7d9-1590714388a2','Y',90,5)
;
-- Sep 12, 2022, 5:07:03 PM IST
UPDATE AD_Field SET IsEncrypted='Y', AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_DATE('2022-09-12 17:07:03','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=207201
;
-- Sep 12, 2022, 5:07:41 PM IST
UPDATE AD_Field SET IsDisplayed='Y', SeqNo=40, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, XPosition=5, IsToolbarButton=NULL,Updated=TO_DATE('2022-09-12 17:07:41','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=207200
;
-- Sep 12, 2022, 5:07:41 PM IST
UPDATE AD_Field SET SeqNo=50, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_DATE('2022-09-12 17:07:41','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=207194
;
-- Sep 12, 2022, 5:07:41 PM IST
UPDATE AD_Field SET IsDisplayed='Y', SeqNo=80, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, XPosition=1, IsToolbarButton=NULL,Updated=TO_DATE('2022-09-12 17:07:41','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=207201
;
-- Sep 12, 2022, 5:07:41 PM IST
UPDATE AD_Field SET SeqNo=90, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_DATE('2022-09-12 17:07:41','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=207198
;
-- Sep 12, 2022, 5:07:41 PM IST
UPDATE AD_Field SET SeqNo=100, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_DATE('2022-09-12 17:07:41','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=207199
;
-- Sep 12, 2022, 5:07:41 PM IST
UPDATE AD_Field SET IsDisplayed='N', SeqNo=0, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, XPosition=1, IsToolbarButton=NULL,Updated=TO_DATE('2022-09-12 17:07:41','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=207195
;
-- Sep 12, 2022, 5:08:48 PM IST
INSERT INTO AD_Column (AD_Column_ID,Version,Name,Description,Help,AD_Table_ID,ColumnName,DefaultValue,FieldLength,IsKey,IsParent,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsEncrypted,AD_Reference_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,AD_Element_ID,IsUpdateable,IsSelectionColumn,EntityType,IsSyncDatabase,IsAlwaysUpdateable,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsAllowCopy,SeqNoSelection,IsToolbarButton,IsSecure,IsHtml) VALUES (215303,0,'Default','Default value','The Default Checkbox indicates if this record will be used as a default value.',200360,'IsDefault','N',1,'N','N','N','N','N',0,'N',20,0,0,'Y',TO_DATE('2022-09-12 17:08:47','YYYY-MM-DD HH24:MI:SS'),100,TO_DATE('2022-09-12 17:08:47','YYYY-MM-DD HH24:MI:SS'),100,1103,'Y','N','D','N','Y','N','N','20322354-658d-4f1c-a843-63210d791833','N',0,'N','N','N')
;
-- Sep 12, 2022, 5:08:54 PM IST
ALTER TABLE SSO_PrincipleConfig ADD IsDefault CHAR(1) DEFAULT 'N' CHECK (IsDefault IN ('Y','N'))
;
-- Sep 12, 2022, 5:09:07 PM IST
INSERT INTO AD_Field (AD_Field_ID,Name,Description,Help,AD_Tab_ID,AD_Column_ID,IsDisplayed,DisplayLength,SeqNo,IsSameLine,IsHeading,IsFieldOnly,IsEncrypted,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,IsReadOnly,IsCentrallyMaintained,EntityType,AD_Field_UU,IsDisplayedGrid,SeqNoGrid,XPosition,ColumnSpan) VALUES (207202,'Default','Default value','The Default Checkbox indicates if this record will be used as a default value.',200328,215303,'Y',1,110,'N','N','N','N',0,0,'Y',TO_DATE('2022-09-12 17:09:06','YYYY-MM-DD HH24:MI:SS'),100,TO_DATE('2022-09-12 17:09:06','YYYY-MM-DD HH24:MI:SS'),100,'N','Y','D','92e8c5be-c0ec-4ab8-8b2c-75b50580fd0e','Y',100,2,2)
;
-- Sep 12, 2022, 5:09:40 PM IST
UPDATE AD_Field SET IsDisplayed='Y', SeqNo=40, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, XPosition=4, ColumnSpan=2, IsToolbarButton=NULL,Updated=TO_DATE('2022-09-12 17:09:40','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=207194
;
-- Sep 12, 2022, 5:09:40 PM IST
UPDATE AD_Field SET IsDisplayed='Y', SeqNo=50, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, XPosition=2, IsToolbarButton=NULL,Updated=TO_DATE('2022-09-12 17:09:40','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=207200
;
-- Sep 12, 2022, 5:09:40 PM IST
UPDATE AD_Field SET IsDisplayed='Y', SeqNo=60, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, XPosition=5, IsToolbarButton=NULL,Updated=TO_DATE('2022-09-12 17:09:40','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=207202
;
-- Sep 12, 2022, 5:09:40 PM IST
UPDATE AD_Field SET SeqNo=70, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_DATE('2022-09-12 17:09:40','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=207196
;
-- Sep 12, 2022, 5:09:40 PM IST
UPDATE AD_Field SET SeqNo=80, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_DATE('2022-09-12 17:09:40','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=207197
;
-- Sep 12, 2022, 5:09:40 PM IST
UPDATE AD_Field SET SeqNo=90, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_DATE('2022-09-12 17:09:40','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=207201
;
-- Sep 12, 2022, 5:09:40 PM IST
UPDATE AD_Field SET SeqNo=100, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_DATE('2022-09-12 17:09:40','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=207198
;
-- Sep 12, 2022, 5:09:40 PM IST
UPDATE AD_Field SET SeqNo=110, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_DATE('2022-09-12 17:09:40','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=207199
;
-- Sep 12, 2022, 7:02:49 PM IST
UPDATE AD_Column SET IsMandatory='Y',Updated=TO_DATE('2022-09-12 19:02:49','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=215302
;
-- Sep 12, 2022, 7:08:59 PM IST
INSERT INTO AD_Column (AD_Column_ID,Version,Name,AD_Table_ID,ColumnName,FieldLength,IsKey,IsParent,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsEncrypted,AD_Reference_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,AD_Element_ID,IsUpdateable,IsSelectionColumn,EntityType,IsSyncDatabase,IsAlwaysUpdateable,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsAllowCopy,SeqNoSelection,IsToolbarButton,IsSecure,FKConstraintType,IsHtml) VALUES (215304,0,'SSO Configuration',200360,'SSO_PrincipleConfig_ID',22,'Y','N','Y','N','N',0,'N',13,0,0,'Y',TO_DATE('2022-09-12 19:08:58','YYYY-MM-DD HH24:MI:SS'),100,TO_DATE('2022-09-12 19:08:58','YYYY-MM-DD HH24:MI:SS'),100,203653,'N','N','D','N','N','N','Y','55dd0703-1d94-4de9-abc2-cd4380265192','N',0,'N','N','N','N')
;
-- Sep 12, 2022, 7:09:00 PM IST
ALTER TABLE SSO_PrincipleConfig MODIFY SSO_PrincipleConfig_ID NUMBER(10)
;
-- Sep 12, 2022, 7:10:54 PM IST
UPDATE AD_Column SET IsUpdateable='N', IsAllowLogging='N',Updated=TO_DATE('2022-09-12 19:10:54','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=215304
;
-- Sep 12, 2022, 7:15:11 PM IST
INSERT INTO AD_Field (AD_Field_ID,Name,AD_Tab_ID,AD_Column_ID,IsDisplayed,DisplayLength,IsSameLine,IsHeading,IsFieldOnly,IsEncrypted,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,IsReadOnly,IsCentrallyMaintained,EntityType,AD_Field_UU,IsDisplayedGrid,ColumnSpan) VALUES (207203,'SSO Configuration',200328,215304,'N',22,'N','N','N','N',0,0,'Y',TO_DATE('2022-09-12 19:15:10','YYYY-MM-DD HH24:MI:SS'),100,TO_DATE('2022-09-12 19:15:10','YYYY-MM-DD HH24:MI:SS'),100,'N','Y','D','7ce5cdab-9590-4185-a300-6a8a8faf4c8e','N',2)
;
-- Sep 12, 2022, 7:15:20 PM IST
UPDATE AD_Field SET SeqNo=0, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_DATE('2022-09-12 19:15:20','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=207203
;
-- Sep 12, 2022, 7:21:23 PM IST
UPDATE AD_Column SET IsMandatory='Y',Updated=TO_DATE('2022-09-12 19:21:23','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=215300
;
-- Sep 12, 2022, 6:22:56 PM IST
INSERT INTO AD_Menu (AD_Menu_ID,Name,Action,AD_Window_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,IsSummary,IsSOTrx,IsReadOnly,EntityType,IsCentrallyMaintained,AD_Menu_UU) VALUES (200213,'SSO Configuration','W',200132,0,0,'Y',TO_DATE('2022-09-12 18:22:55','YYYY-MM-DD HH24:MI:SS'),100,TO_DATE('2022-09-12 18:22:55','YYYY-MM-DD HH24:MI:SS'),100,'N','Y','N','D','Y','7ce4cdf9-d345-4a4f-919b-698661ea99f0')
;
-- Sep 12, 2022, 6:22:56 PM IST
INSERT INTO AD_TreeNodeMM (AD_Client_ID,AD_Org_ID, IsActive,Created,CreatedBy,Updated,UpdatedBy, AD_Tree_ID, Node_ID, Parent_ID, SeqNo, AD_TreeNodeMM_UU) SELECT t.AD_Client_ID, 0, 'Y', SysDate, 100, SysDate, 100,t.AD_Tree_ID, 200213, 0, 999, Generate_UUID() FROM AD_Tree t WHERE t.AD_Client_ID=0 AND t.IsActive='Y' AND t.IsAllNodes='Y' AND t.TreeType='MM' AND NOT EXISTS (SELECT * FROM AD_TreeNodeMM e WHERE e.AD_Tree_ID=t.AD_Tree_ID AND Node_ID=200213)
;
-- Sep 12, 2022, 7:00:55 PM IST
INSERT INTO AD_SysConfig (AD_SysConfig_ID,AD_Client_ID,AD_Org_ID,Created,Updated,CreatedBy,UpdatedBy,IsActive,Name,Value,Description,EntityType,ConfigurationLevel,AD_SysConfig_UU) VALUES (200205,0,0,TO_DATE('2022-09-12 19:00:54','YYYY-MM-DD HH24:MI:SS'),TO_DATE('2022-09-12 19:00:54','YYYY-MM-DD HH24:MI:SS'),100,100,'Y','ENABLE_SSO','N','Enable SSO Authentication Login','D','S','51cf2755-a4cb-49bf-b08e-c1ef54c1e0f8')
;
-- Sep 15, 2022, 11:56:42 AM IST
INSERT INTO AD_Element (AD_Element_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,ColumnName,Name,Description,PrintName,EntityType,AD_Element_UU) VALUES (203670,0,0,'Y',TO_DATE('2022-09-15 11:56:41','YYYY-MM-DD HH24:MI:SS'),100,TO_DATE('2022-09-15 11:56:41','YYYY-MM-DD HH24:MI:SS'),100,'SSO_Provider','SSO Provider','Single Sign-On (SSO) Providers ( Microsoft Azure , Google, Jump Cloud etc..)','SSO Provider','D','959ffea1-effb-434a-8480-f035fca65815')
;
-- Sep 15, 2022, 11:58:07 AM IST
INSERT INTO AD_Reference (AD_Reference_ID,Name,ValidationType,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,EntityType,IsOrderByValue,AD_Reference_UU) VALUES (200213,'SSO Provider List','L',0,0,'Y',TO_DATE('2022-09-15 11:58:06','YYYY-MM-DD HH24:MI:SS'),100,TO_DATE('2022-09-15 11:58:06','YYYY-MM-DD HH24:MI:SS'),100,'D','N','f12db9ec-7c5c-46a7-a2ba-d01b4043dae2')
;
-- Sep 15, 2022, 11:58:44 AM IST
INSERT INTO AD_Column (AD_Column_ID,Version,Name,Description,AD_Table_ID,ColumnName,FieldLength,IsKey,IsParent,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsEncrypted,AD_Reference_ID,AD_Reference_Value_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,AD_Element_ID,IsUpdateable,IsSelectionColumn,EntityType,IsSyncDatabase,IsAlwaysUpdateable,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsAllowCopy,SeqNoSelection,IsToolbarButton,IsSecure,FKConstraintType,IsHtml) VALUES (215355,0,'SSO Provider','Single Sign-On (SSO) Providers ( Microsoft Azure , Google, Jump Cloud etc..)',200360,'SSO_Provider',22,'N','N','Y','N','N',0,'N',17,200213,0,0,'Y',TO_DATE('2022-09-15 11:58:42','YYYY-MM-DD HH24:MI:SS'),100,TO_DATE('2022-09-15 11:58:42','YYYY-MM-DD HH24:MI:SS'),100,203670,'Y','N','D','N','N','N','N','88889119-20f7-4261-9bc7-344c0c7fc9ff','N',0,'N','N','N','N')
;
-- Sep 15, 2022, 11:58:46 AM IST
ALTER TABLE SSO_PrincipleConfig ADD SSO_Provider VARCHAR2(22 CHAR) NOT NULL
;
-- Sep 15, 2022, 11:59:03 AM IST
INSERT INTO AD_Field (AD_Field_ID,Name,Description,AD_Tab_ID,AD_Column_ID,IsDisplayed,DisplayLength,SeqNo,IsSameLine,IsHeading,IsFieldOnly,IsEncrypted,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,IsReadOnly,IsCentrallyMaintained,EntityType,AD_Field_UU,IsDisplayedGrid,SeqNoGrid,ColumnSpan) VALUES (207242,'SSO Provider','Single Sign-On (SSO) Providers ( Microsoft Azure , Google, Jump Cloud etc..)',200328,215355,'Y',22,120,'N','N','N','N',0,0,'Y',TO_DATE('2022-09-15 11:59:02','YYYY-MM-DD HH24:MI:SS'),100,TO_DATE('2022-09-15 11:59:02','YYYY-MM-DD HH24:MI:SS'),100,'N','Y','D','425a912e-b334-46b6-863f-ebd31bb46003','Y',110,2)
;
-- Sep 15, 2022, 11:59:39 AM IST
UPDATE AD_Field SET SeqNo=30, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, SeqNoGrid=10, IsToolbarButton=NULL,Updated=TO_DATE('2022-09-15 11:59:39','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=207242
;
-- Sep 19, 2022, 3:49:07 PM IST
INSERT INTO AD_Message (MsgType,MsgText,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,AD_Message_ID,Value,EntityType,AD_Message_UU) VALUES ('E','The user has no access',0,0,'Y',TO_DATE('2022-09-19 15:49:05','YYYY-MM-DD HH24:MI:SS'),100,TO_DATE('2022-09-19 15:49:05','YYYY-MM-DD HH24:MI:SS'),100,200784,'UserNoRoleError','D','241a07d4-4b46-4666-b7a9-277edbcdefa5')
;
-- Sep 19, 2022, 3:49:32 PM IST
INSERT INTO AD_Message (MsgType,MsgText,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,AD_Message_ID,Value,EntityType,AD_Message_UU) VALUES ('E','User not found',0,0,'Y',TO_DATE('2022-09-19 15:49:31','YYYY-MM-DD HH24:MI:SS'),100,TO_DATE('2022-09-19 15:49:31','YYYY-MM-DD HH24:MI:SS'),100,200785,'UserNotFoundError','D','64499310-0505-4cc3-8089-b6e64011d99a')
;
-- Oct 18, 2022, 11:37:28 AM IST
UPDATE AD_Column SET IsMandatory='N',Updated=TO_DATE('2022-10-18 11:37:28','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=215298
;
-- Oct 18, 2022, 11:37:45 AM IST
UPDATE AD_Column SET IsMandatory='N',Updated=TO_DATE('2022-10-18 11:37:45','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=215300
;
-- Oct 18, 2022, 11:37:55 AM IST
UPDATE AD_Column SET IsMandatory='N',Updated=TO_DATE('2022-10-18 11:37:55','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=215302
;
-- Oct 18, 2022, 11:38:12 AM IST
UPDATE AD_Column SET IsMandatory='N',Updated=TO_DATE('2022-10-18 11:38:12','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=215297
;
-- Oct 18, 2022, 11:38:28 AM IST
UPDATE AD_Field SET IsDisplayed='N', AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsDisplayedGrid='N', IsToolbarButton=NULL,Updated=TO_DATE('2022-10-18 11:38:28','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=207199
;
-- Oct 19, 2022, 3:54:46 PM IST
ALTER TABLE SSO_PrincipleConfig MODIFY SSO_ApplicationClientID VARCHAR2(100 CHAR) DEFAULT NULL
;
-- Oct 19, 2022, 3:54:46 PM IST
ALTER TABLE SSO_PrincipleConfig MODIFY SSO_ApplicationClientID NULL
;
-- Oct 19, 2022, 3:54:58 PM IST
ALTER TABLE SSO_PrincipleConfig MODIFY SSO_ApplicationLogoutURL VARCHAR2(1000 CHAR) DEFAULT NULL
;
-- Oct 19, 2022, 3:55:09 PM IST
ALTER TABLE SSO_PrincipleConfig MODIFY SSO_ApplicationRedirectURIs VARCHAR2(1000 CHAR) DEFAULT NULL
;
-- Oct 19, 2022, 3:55:22 PM IST
ALTER TABLE SSO_PrincipleConfig MODIFY SSO_ApplicationSecretKey VARCHAR2(100 CHAR) DEFAULT NULL
;
-- Oct 19, 2022, 3:55:28 PM IST
ALTER TABLE SSO_PrincipleConfig MODIFY SSO_AuthorizationTenantID VARCHAR2(100 CHAR) DEFAULT NULL
;
-- Oct 19, 2022, 3:55:28 PM IST
ALTER TABLE SSO_PrincipleConfig MODIFY SSO_AuthorizationTenantID NULL
;
-- Nov 4, 2022, 4:29:25 PM IST
INSERT INTO AD_Element (AD_Element_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,ColumnName,Name,Description,PrintName,EntityType,AD_Element_UU) VALUES (203725,0,0,'Y',TO_DATE('2022-11-04 16:29:24','YYYY-MM-DD HH24:MI:SS'),100,TO_DATE('2022-11-04 16:29:24','YYYY-MM-DD HH24:MI:SS'),100,'SSO_ApplicationDomain','Application Domain','SSO Application Domain','Application Domain','D','e5ed0a02-4eaf-4713-9107-ccc79f1e0cb1')
;
-- Nov 4, 2022, 4:30:18 PM IST
INSERT INTO AD_Element (AD_Element_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,ColumnName,Name,Description,PrintName,EntityType,AD_Element_UU) VALUES (203727,0,0,'Y',TO_DATE('2022-11-04 16:30:18','YYYY-MM-DD HH24:MI:SS'),100,TO_DATE('2022-11-04 16:30:18','YYYY-MM-DD HH24:MI:SS'),100,'SSO_ApplicationDiscoveryURI','Application Discovery URI','SSO Application Discovery URI','Application Discovery URI','D','999d76d2-1744-457d-bac9-3134f750874f')
;
-- Nov 4, 2022, 4:30:45 PM IST
INSERT INTO AD_Column (AD_Column_ID,Version,Name,Description,AD_Table_ID,ColumnName,FieldLength,IsKey,IsParent,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsEncrypted,AD_Reference_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,AD_Element_ID,IsUpdateable,IsSelectionColumn,EntityType,IsSyncDatabase,IsAlwaysUpdateable,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsAllowCopy,SeqNoSelection,IsToolbarButton,IsSecure,FKConstraintType,IsHtml) VALUES (215637,0,'Application Discovery URI','SSO Application Discovery URI',200360,'SSO_ApplicationDiscoveryURI',4000,'N','N','N','N','N',0,'N',10,0,0,'Y',TO_DATE('2022-11-04 16:30:44','YYYY-MM-DD HH24:MI:SS'),100,TO_DATE('2022-11-04 16:30:44','YYYY-MM-DD HH24:MI:SS'),100,203727,'Y','N','D','N','Y','N','Y','f806a488-6dfc-4fee-aa15-9794aa9eafe0','Y',0,'N','N','N','N')
;
-- Nov 4, 2022, 4:30:46 PM IST
ALTER TABLE SSO_PrincipleConfig ADD SSO_ApplicationDiscoveryURI VARCHAR2(4000 CHAR) DEFAULT NULL
;
-- Nov 4, 2022, 4:31:06 PM IST
INSERT INTO AD_Column (AD_Column_ID,Version,Name,Description,AD_Table_ID,ColumnName,FieldLength,IsKey,IsParent,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsEncrypted,AD_Reference_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,AD_Element_ID,IsUpdateable,IsSelectionColumn,EntityType,IsSyncDatabase,IsAlwaysUpdateable,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsAllowCopy,SeqNoSelection,IsToolbarButton,IsSecure,FKConstraintType,IsHtml) VALUES (215638,0,'Application Domain','SSO Application Domain',200360,'SSO_ApplicationDomain',4000,'N','N','N','N','N',0,'N',10,0,0,'Y',TO_DATE('2022-11-04 16:31:06','YYYY-MM-DD HH24:MI:SS'),100,TO_DATE('2022-11-04 16:31:06','YYYY-MM-DD HH24:MI:SS'),100,203725,'Y','N','D','N','Y','N','Y','2dbe8818-b3c5-470d-885f-7d5cb2eb0c50','Y',0,'N','N','N','N')
;
-- Nov 4, 2022, 4:31:07 PM IST
ALTER TABLE SSO_PrincipleConfig ADD SSO_ApplicationDomain VARCHAR2(4000 CHAR) DEFAULT NULL
;
-- Nov 4, 2022, 4:31:25 PM IST
INSERT INTO AD_Field (AD_Field_ID,Name,Description,AD_Tab_ID,AD_Column_ID,IsDisplayed,DisplayLength,SeqNo,IsSameLine,IsHeading,IsFieldOnly,IsEncrypted,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,IsReadOnly,IsCentrallyMaintained,EntityType,AD_Field_UU,IsDisplayedGrid,SeqNoGrid,ColumnSpan) VALUES (207414,'Application Discovery URI','SSO Application Discovery URI',200328,215637,'Y',4000,120,'N','N','N','N',0,0,'Y',TO_DATE('2022-11-04 16:31:24','YYYY-MM-DD HH24:MI:SS'),100,TO_DATE('2022-11-04 16:31:24','YYYY-MM-DD HH24:MI:SS'),100,'N','Y','D','24573116-ea2f-4cc2-86d5-19abee762b99','Y',110,5)
;
-- Nov 4, 2022, 4:31:25 PM IST
INSERT INTO AD_Field (AD_Field_ID,Name,Description,AD_Tab_ID,AD_Column_ID,IsDisplayed,DisplayLength,SeqNo,IsSameLine,IsHeading,IsFieldOnly,IsEncrypted,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,IsReadOnly,IsCentrallyMaintained,EntityType,AD_Field_UU,IsDisplayedGrid,SeqNoGrid,ColumnSpan) VALUES (207415,'Application Domain','SSO Application Domain',200328,215638,'Y',4000,130,'N','N','N','N',0,0,'Y',TO_DATE('2022-11-04 16:31:25','YYYY-MM-DD HH24:MI:SS'),100,TO_DATE('2022-11-04 16:31:25','YYYY-MM-DD HH24:MI:SS'),100,'N','Y','D','3b760acd-467f-42ad-9d9c-2bc1887185b8','Y',120,5)
;
-- Nov 4, 2022, 4:31:38 PM IST
UPDATE AD_Field SET IsDisplayed='Y', SeqNo=110, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, XPosition=1, IsToolbarButton=NULL,Updated=TO_DATE('2022-11-04 16:31:38','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=207415
;
-- Nov 4, 2022, 4:31:38 PM IST
UPDATE AD_Field SET SeqNo=0, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_DATE('2022-11-04 16:31:38','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=207199
;
-- Nov 7, 2022, 4:32:56 PM IST
UPDATE AD_Column SET Help='A directory of the OIDC architecture of your user pool.',Updated=TO_DATE('2022-11-07 16:32:56','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=215637
;
-- Nov 7, 2022, 4:37:19 PM IST
UPDATE AD_Column SET Help='A domain name is a string that identifies a realm of administrative autonomy, authority or control within the Internet for your Provider.',Updated=TO_DATE('2022-11-07 16:37:19','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=215638
;
-- Nov 7, 2022, 4:43:08 PM IST
UPDATE AD_Column SET Help='SSO provider unique app client id',Updated=TO_DATE('2022-11-07 16:43:08','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=215298
;
-- Nov 7, 2022, 4:45:25 PM IST
UPDATE AD_Column SET Help='SSO provider client secret key to access this user info',Updated=TO_DATE('2022-11-07 16:45:25','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=215302
;
-- Nov 7, 2022, 4:57:57 PM IST
UPDATE AD_Column SET Help='SSO provider Tenant ID is a globally unique identifier (GUID)',Updated=TO_DATE('2022-11-07 16:57:57','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=215297
;
-- Nov 7, 2022, 4:58:39 PM IST
UPDATE AD_Column SET Description='SSO provider Tenant ID is a globally unique identifier (GUID)',Updated=TO_DATE('2022-11-07 16:58:39','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=215297
;
-- Nov 7, 2022, 4:59:04 PM IST
UPDATE AD_Column SET Description='SSO provider unique app client id',Updated=TO_DATE('2022-11-07 16:59:04','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=215298
;
-- Nov 7, 2022, 4:59:12 PM IST
UPDATE AD_Column SET Description='A directory of the OIDC architecture of your user pool.',Updated=TO_DATE('2022-11-07 16:59:12','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=215637
;
-- Nov 7, 2022, 4:59:22 PM IST
UPDATE AD_Column SET Description='A domain name is a string that identifies a realm of administrative autonomy, authority or control within the Internet for your Provider.',Updated=TO_DATE('2022-11-07 16:59:22','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=215638
;
-- Nov 7, 2022, 4:59:29 PM IST
UPDATE AD_Column SET Description='This is where SSO provider sends a request to have the application clear the user''s session data',Updated=TO_DATE('2022-11-07 16:59:29','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=215301
;
-- Nov 7, 2022, 4:59:36 PM IST
UPDATE AD_Column SET Description='The URIs SSO provider will accept as destinations when returning authentication responses (tokens) after successfully authenticating.',Updated=TO_DATE('2022-11-07 16:59:36','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=215300
;
-- Nov 7, 2022, 4:59:40 PM IST
UPDATE AD_Column SET Description='SSO provider client secret key to access this user info',Updated=TO_DATE('2022-11-07 16:59:40','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=215302
;
-- Nov 8, 2022, 3:50:10 PM IST
UPDATE AD_Field SET Description='SSO provider unique app client id', AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_DATE('2022-11-08 15:50:10','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=207197
;
-- Nov 8, 2022, 3:50:29 PM IST
UPDATE AD_Field SET Description='A directory of the OIDC architecture of your user pool.', AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_DATE('2022-11-08 15:50:29','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=207414
;
-- Nov 8, 2022, 3:50:41 PM IST
UPDATE AD_Field SET Description='A domain name is a string that identifies a realm of administrative autonomy, authority or control within the Internet for your Provider.', AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_DATE('2022-11-08 15:50:41','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=207415
;
-- Nov 8, 2022, 3:51:17 PM IST
UPDATE AD_Field SET Description='The URIs SSO provider will accept as destinations when returning authentication responses (tokens) after successfully authenticating or signing out users.', AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_DATE('2022-11-08 15:51:17','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=207198
;
-- Nov 8, 2022, 3:51:30 PM IST
UPDATE AD_Field SET Description='SSO provider client secret key to access this user info', AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_DATE('2022-11-08 15:51:30','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=207201
;
-- Nov 8, 2022, 3:51:44 PM IST
UPDATE AD_Field SET Description='SSO provider Tenant ID is a globally unique identifier (GUID)', AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_DATE('2022-11-08 15:51:44','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=207196
;
-- Nov 8, 2022, 4:06:57 PM IST
UPDATE AD_Column SET Help='The URIs SSO provider will accept as destinations when returning authentication responses (tokens) after successfully authenticating.',Updated=TO_DATE('2022-11-08 16:06:57','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=215300
;
-- Nov 8, 2022, 4:07:07 PM IST
UPDATE AD_Field SET Description='The URIs SSO provider will accept as destinations when returning authentication responses (tokens) after successfully authenticating.', AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_DATE('2022-11-08 16:07:07','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=207198
;
SELECT register_migration_script('202209121800_IDEMPIERE-5346.sql') FROM dual
;

View File

@ -0,0 +1,57 @@
-- IDEMPIERE-5346 SSO Support
SELECT register_migration_script('202301191424_IDEMPIERE-5346.sql') FROM dual;
SET SQLBLANKLINES ON
SET DEFINE OFF
-- Jan 19, 2023, 2:24:15 PM IST
INSERT INTO AD_Element (AD_Element_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,ColumnName,Name,Description,PrintName,EntityType,AD_Element_UU) VALUES (203784,0,0,'Y',TO_TIMESTAMP('2023-01-19 14:24:15','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2023-01-19 14:24:15','YYYY-MM-DD HH24:MI:SS'),100,'SSO_OSGIRedirectURIs','Felix Web Console Redirect URIs','Apache Felix Web Console Bundles Redirect URIs','Felix Web Console Redirect URIs','D','5a19b1a3-6fb1-4aea-937b-cf976ba5f4fd')
;
-- Jan 19, 2023, 2:25:23 PM IST
INSERT INTO AD_Element (AD_Element_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,ColumnName,Name,Description,PrintName,EntityType,AD_Element_UU) VALUES (203785,0,0,'Y',TO_TIMESTAMP('2023-01-19 14:25:23','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2023-01-19 14:25:23','YYYY-MM-DD HH24:MI:SS'),100,'SSO_IDempMonitorRedirectURIs','iDempiere Monitor Redirect URIs','iDempiere Monitor Redirect URIs','iDempiere Monitor Redirect URIs','D','4bb92dd4-0082-4d0e-be88-053e6f28e90c')
;
-- Jan 19, 2023, 2:25:52 PM IST
INSERT INTO AD_Column (AD_Column_ID,Version,Name,Description,AD_Table_ID,ColumnName,FieldLength,IsKey,IsParent,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsEncrypted,AD_Reference_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,AD_Element_ID,IsUpdateable,IsSelectionColumn,EntityType,IsSyncDatabase,IsAlwaysUpdateable,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsAllowCopy,SeqNoSelection,IsToolbarButton,IsSecure,FKConstraintType,IsHtml) VALUES (215764,0,'iDempiere Monitor Redirect URIs','iDempiere Monitor Redirect URIs',200360,'SSO_IDempMonitorRedirectURIs',1000,'N','N','N','N','N',0,'N',10,0,0,'Y',TO_TIMESTAMP('2023-01-19 14:25:51','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2023-01-19 14:25:51','YYYY-MM-DD HH24:MI:SS'),100,203785,'Y','N','D','N','N','N','Y','258c99b4-3d49-4b31-acf1-3ca2cd7588ee','Y',0,'N','N','N','N')
;
-- Jan 19, 2023, 2:25:54 PM IST
ALTER TABLE SSO_PrincipleConfig ADD SSO_IDempMonitorRedirectURIs VARCHAR2(1000 CHAR) DEFAULT NULL
;
-- Jan 19, 2023, 2:26:17 PM IST
INSERT INTO AD_Column (AD_Column_ID,Version,Name,Description,AD_Table_ID,ColumnName,FieldLength,IsKey,IsParent,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsEncrypted,AD_Reference_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,AD_Element_ID,IsUpdateable,IsSelectionColumn,EntityType,IsSyncDatabase,IsAlwaysUpdateable,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsAllowCopy,SeqNoSelection,IsToolbarButton,IsSecure,FKConstraintType,IsHtml) VALUES (215765,0,'Felix Web Console Redirect URIs','Apache Felix Web Console Bundles Redirect URIs',200360,'SSO_OSGIRedirectURIs',1000,'N','N','N','N','N',0,'N',10,0,0,'Y',TO_TIMESTAMP('2023-01-19 14:26:16','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2023-01-19 14:26:16','YYYY-MM-DD HH24:MI:SS'),100,203784,'Y','N','D','N','N','N','Y','6e3224ea-9fe9-4129-bece-6d1863f75ca3','Y',0,'N','N','N','N')
;
-- Jan 19, 2023, 2:26:18 PM IST
ALTER TABLE SSO_PrincipleConfig ADD SSO_OSGIRedirectURIs VARCHAR2(1000 CHAR) DEFAULT NULL
;
-- Jan 19, 2023, 2:26:44 PM IST
INSERT INTO AD_Field (AD_Field_ID,Name,Description,AD_Tab_ID,AD_Column_ID,IsDisplayed,DisplayLength,SeqNo,IsSameLine,IsHeading,IsFieldOnly,IsEncrypted,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,IsReadOnly,IsCentrallyMaintained,EntityType,AD_Field_UU,IsDisplayedGrid,SeqNoGrid,ColumnSpan) VALUES (207564,'iDempiere Monitor Redirect URIs','iDempiere Monitor Redirect URIs',200328,215764,'Y',1000,130,'N','N','N','N',0,0,'Y',TO_TIMESTAMP('2023-01-19 14:26:44','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2023-01-19 14:26:44','YYYY-MM-DD HH24:MI:SS'),100,'N','Y','D','f24ccf3b-b2c8-4e79-92b9-3cb645ef643a','Y',130,5)
;
-- Jan 19, 2023, 2:26:45 PM IST
INSERT INTO AD_Field (AD_Field_ID,Name,Description,AD_Tab_ID,AD_Column_ID,IsDisplayed,DisplayLength,SeqNo,IsSameLine,IsHeading,IsFieldOnly,IsEncrypted,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,IsReadOnly,IsCentrallyMaintained,EntityType,AD_Field_UU,IsDisplayedGrid,SeqNoGrid,ColumnSpan) VALUES (207565,'Felix Web Console Redirect URIs','Apache Felix Web Console Bundles Redirect URIs',200328,215765,'Y',1000,140,'N','N','N','N',0,0,'Y',TO_TIMESTAMP('2023-01-19 14:26:44','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2023-01-19 14:26:44','YYYY-MM-DD HH24:MI:SS'),100,'N','Y','D','21fba3e0-7bd6-4415-a17c-e95021e0caef','Y',140,5)
;
-- Jan 19, 2023, 2:27:10 PM IST
UPDATE AD_Field SET IsDisplayed='Y', SeqNo=110, XPosition=1,Updated=TO_TIMESTAMP('2023-01-19 14:27:10','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=207564
;
-- Jan 19, 2023, 2:27:10 PM IST
UPDATE AD_Field SET IsDisplayed='Y', SeqNo=120, XPosition=1,Updated=TO_TIMESTAMP('2023-01-19 14:27:10','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=207565
;
-- Jan 19, 2023, 2:27:10 PM IST
UPDATE AD_Field SET SeqNo=130,Updated=TO_TIMESTAMP('2023-01-19 14:27:10','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=207415
;
-- Jan 19, 2023, 2:27:10 PM IST
UPDATE AD_Field SET SeqNo=140,Updated=TO_TIMESTAMP('2023-01-19 14:27:10','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=207414
;
-- Jan 23, 2023, 6:52:57 PM IST
INSERT INTO AD_SysConfig (AD_SysConfig_ID,AD_Client_ID,AD_Org_ID,Created,Updated,CreatedBy,UpdatedBy,IsActive,Name,Value,Description,EntityType,ConfigurationLevel,AD_SysConfig_UU) VALUES (200216,0,0,TO_TIMESTAMP('2023-01-23 18:52:56','YYYY-MM-DD HH24:MI:SS'),TO_TIMESTAMP('2023-01-23 18:52:56','YYYY-MM-DD HH24:MI:SS'),100,100,'Y','SSO_SELECT_ROLE','Y','Show Role Panel When Login With SSO','D','S','0e1cc248-9f7b-4572-96fd-0270c6a9934b')
;

View File

@ -0,0 +1,26 @@
-- IDEMPIERE-5346 SSO Support
SELECT register_migration_script('202302081442_IDEMPIERE-5346.sql') FROM dual;
SET SQLBLANKLINES ON
SET DEFINE OFF
-- Feb 8, 2023, 2:42:41 PM CET
UPDATE AD_Table SET AD_Window_ID=200132,Updated=TO_TIMESTAMP('2023-02-08 14:42:41','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Table_ID=200360
;
-- Dec 13, 2022, 3:13:42 PM CET
UPDATE AD_TreeNodeMM SET Parent_ID=200178, SeqNo=0,Updated=TO_TIMESTAMP('2022-12-13 15:13:42','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Tree_ID=10 AND Node_ID=200179
;
-- Dec 13, 2022, 3:13:42 PM CET
UPDATE AD_TreeNodeMM SET Parent_ID=200178, SeqNo=1,Updated=TO_TIMESTAMP('2022-12-13 15:13:42','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Tree_ID=10 AND Node_ID=200180
;
-- Dec 13, 2022, 3:13:42 PM CET
UPDATE AD_TreeNodeMM SET Parent_ID=200178, SeqNo=2,Updated=TO_TIMESTAMP('2022-12-13 15:13:42','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Tree_ID=10 AND Node_ID=200182
;
-- Dec 13, 2022, 3:13:42 PM CET
UPDATE AD_TreeNodeMM SET Parent_ID=200178, SeqNo=3,Updated=TO_TIMESTAMP('2022-12-13 15:13:42','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Tree_ID=10 AND Node_ID=200213
;

View File

@ -0,0 +1,57 @@
-- IDEMPIERE-5346 SSO Support
SELECT register_migration_script('202303281510_IDEMPIERE-5346.sql') FROM dual;
SET SQLBLANKLINES ON
SET DEFINE OFF
-- Mar 28, 2023, 3:10:00 PM IST
INSERT INTO AD_Element (AD_Element_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,ColumnName,Name,PrintName,EntityType,AD_Element_UU) VALUES (203798,0,0,'Y',TO_TIMESTAMP('2023-03-28 15:09:59','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2023-03-28 15:09:59','YYYY-MM-DD HH24:MI:SS'),100,'AuthenticationType','Authentication Type','Authentication Type','D','b1c28755-ae35-4567-8912-c1a91e98bca4')
;
-- Mar 28, 2023, 3:10:31 PM IST
INSERT INTO AD_Column (AD_Column_ID,Version,Name,AD_Table_ID,ColumnName,FieldLength,IsKey,IsParent,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsEncrypted,AD_Reference_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,AD_Element_ID,IsUpdateable,IsSelectionColumn,EntityType,IsSyncDatabase,IsAlwaysUpdateable,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsAllowCopy,SeqNoSelection,IsToolbarButton,IsSecure,FKConstraintType,IsHtml) VALUES (215808,0,'Authentication Type',114,'AuthenticationType',10,'N','N','N','N','N',0,'N',17,0,0,'Y',TO_TIMESTAMP('2023-03-28 15:10:30','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2023-03-28 15:10:30','YYYY-MM-DD HH24:MI:SS'),100,203798,'Y','N','D','N','N','N','Y','b887af64-55cf-48f0-91e2-48b57c228c81','Y',0,'N','N','N','N')
;
-- Mar 28, 2023, 3:11:05 PM IST
INSERT INTO AD_Reference (AD_Reference_ID,Name,ValidationType,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,EntityType,IsOrderByValue,AD_Reference_UU) VALUES (200239,'Authentication Type List','L',0,0,'Y',TO_TIMESTAMP('2023-03-28 15:11:04','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2023-03-28 15:11:04','YYYY-MM-DD HH24:MI:SS'),100,'D','N','8bf2b11e-71f7-4b40-b4fb-4b6dfd7d767e')
;
-- Mar 28, 2023, 3:13:37 PM IST
INSERT INTO AD_Ref_List (AD_Ref_List_ID,Name,AD_Reference_ID,Value,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,EntityType,AD_Ref_List_UU) VALUES (200632,'SSO Only',200239,'SSO',0,0,'Y',TO_TIMESTAMP('2023-03-28 15:13:36','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2023-03-28 15:13:36','YYYY-MM-DD HH24:MI:SS'),100,'D','d726bc83-5d69-4082-b224-e0803b5c234d')
;
-- Mar 28, 2023, 3:14:19 PM IST
INSERT INTO AD_Ref_List (AD_Ref_List_ID,Name,AD_Reference_ID,Value,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,EntityType,AD_Ref_List_UU) VALUES (200633,'Application Only',200239,'FBK',0,0,'Y',TO_TIMESTAMP('2023-03-28 15:14:18','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2023-03-28 15:14:18','YYYY-MM-DD HH24:MI:SS'),100,'D','32f2269c-8c71-40f1-a128-d6f805030a69')
;
-- Mar 28, 2023, 3:16:08 PM IST
INSERT INTO AD_Ref_List (AD_Ref_List_ID,Name,AD_Reference_ID,Value,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,EntityType,AD_Ref_List_UU) VALUES (200634,'Application and SSO',200239,'APO',0,0,'Y',TO_TIMESTAMP('2023-03-28 15:16:08','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2023-03-28 15:16:08','YYYY-MM-DD HH24:MI:SS'),100,'D','7cd3af94-1e49-4d9f-9e33-dbdc0dfce7bb')
;
-- Mar 28, 2023, 3:16:21 PM IST
UPDATE AD_Column SET AD_Reference_Value_ID=200239,Updated=TO_TIMESTAMP('2023-03-28 15:16:21','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=215808
;
-- Mar 28, 2023, 3:16:23 PM IST
ALTER TABLE AD_User ADD AuthenticationType VARCHAR2(10 CHAR) DEFAULT NULL
;
-- Mar 28, 2023, 3:41:55 PM IST
INSERT INTO AD_Field (AD_Field_ID,Name,AD_Tab_ID,AD_Column_ID,IsDisplayed,DisplayLength,SeqNo,IsSameLine,IsHeading,IsFieldOnly,IsEncrypted,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,IsReadOnly,IsCentrallyMaintained,EntityType,AD_Field_UU,IsDisplayedGrid,SeqNoGrid,ColumnSpan) VALUES (207598,'Authentication Type',118,215808,'Y',10,460,'N','N','N','N',0,0,'Y',TO_TIMESTAMP('2023-03-28 15:41:55','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2023-03-28 15:41:55','YYYY-MM-DD HH24:MI:SS'),100,'N','Y','D','65779dd6-818c-40f4-9f73-eda819697164','Y',440,2)
;
-- May 22, 2023, 1:50:43 PM IST
INSERT INTO AD_Column (AD_Column_ID,Version,Name,AD_Table_ID,ColumnName,FieldLength,IsKey,IsParent,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsEncrypted,AD_Reference_ID,AD_Reference_Value_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,AD_Element_ID,IsUpdateable,IsSelectionColumn,EntityType,IsSyncDatabase,IsAlwaysUpdateable,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsAllowCopy,SeqNoSelection,IsToolbarButton,IsSecure,FKConstraintType,IsHtml) VALUES (215840,0,'Authentication Type',112,'AuthenticationType',10,'N','N','N','N','N',0,'N',17,200239,0,0,'Y',TO_TIMESTAMP('2023-05-22 13:50:42','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2023-05-22 13:50:42','YYYY-MM-DD HH24:MI:SS'),100,203798,'Y','N','D','N','N','N','Y','33738ece-b095-44eb-a032-5564d47a04ca','Y',0,'N','N','N','N')
;
-- May 22, 2023, 1:53:39 PM IST
ALTER TABLE AD_Client ADD AuthenticationType VARCHAR2(10 CHAR) DEFAULT NULL
;
-- May 22, 2023, 2:49:13 PM IST
INSERT INTO AD_Field (AD_Field_ID,Name,AD_Tab_ID,AD_Column_ID,IsDisplayed,DisplayLength,SeqNo,SortNo,IsSameLine,IsHeading,IsFieldOnly,IsEncrypted,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,IsReadOnly,IsCentrallyMaintained,EntityType,AD_Field_UU,IsDisplayedGrid,SeqNoGrid,XPosition,ColumnSpan,NumLines,IsQuickEntry,IsDefaultFocus,IsAdvancedField,IsQuickForm) VALUES (207626,'Authentication Type',145,215840,'Y',0,240,0,'N','N','N','N',0,0,'Y',TO_TIMESTAMP('2023-05-22 14:49:12','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2023-05-22 14:49:12','YYYY-MM-DD HH24:MI:SS'),100,'N','Y','D','1fbf8620-b944-4be9-b60f-f9bf4fcff4c8','Y',280,2,2,1,'N','N','N','N')
;
-- May 22, 2023, 2:49:38 PM IST
UPDATE AD_Field SET SeqNo=240, XPosition=1,Updated=TO_TIMESTAMP('2023-05-22 14:49:38','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=207626
;

View File

@ -0,0 +1,67 @@
-- IDEMPIERE-5346 SSO Support
SELECT register_migration_script('202307111656_IDEMPIERE-5346.sql') FROM dual;
SET SQLBLANKLINES ON
SET DEFINE OFF
-- Jul 11, 2023, 4:56:08 PM IST
UPDATE AD_Table SET TableName='SSO_PrincipalConfig',Updated=TO_TIMESTAMP('2023-07-11 16:56:08','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Table_ID=200360
;
-- Jul 11, 2023, 4:56:09 PM IST
INSERT INTO AD_Sequence (Name,CurrentNext,IsAudited,StartNewYear,Description,IsActive,IsTableID,AD_Client_ID,AD_Org_ID,Created,CreatedBy,Updated,UpdatedBy,AD_Sequence_ID,IsAutoSequence,StartNo,IncrementNo,CurrentNextSys,AD_Sequence_UU) VALUES ('SSO_PrincipalConfig',1000000,'N','N','Table SSO_PrincipalConfig','Y','Y',0,0,TO_TIMESTAMP('2023-07-11 16:56:08','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2023-07-11 16:56:08','YYYY-MM-DD HH24:MI:SS'),100,200458,'Y',1000000,1,200000,'0a3c92f4-feb8-40aa-9c08-2c91a2fc1aad')
;
-- Jul 12, 2023, 10:12:14 AM IST
UPDATE AD_Element SET ColumnName='SSO_PrincipalConfig_ID',Updated=TO_TIMESTAMP('2023-07-12 10:12:14','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Element_ID=203653
;
-- Jul 12, 2023, 10:12:14 AM IST
UPDATE AD_Column SET ColumnName='SSO_PrincipalConfig_ID', Name='SSO Configuration', Description=NULL, Help=NULL, Placeholder=NULL WHERE AD_Element_ID=203653
;
-- Jul 12, 2023, 10:12:14 AM IST
UPDATE AD_Process_Para SET ColumnName='SSO_PrincipalConfig_ID', Name='SSO Configuration', Description=NULL, Help=NULL, AD_Element_ID=203653 WHERE UPPER(ColumnName)='SSO_PRINCIPALCONFIG_ID' AND IsCentrallyMaintained='Y' AND AD_Element_ID IS NULL
;
-- Jul 12, 2023, 10:12:14 AM IST
UPDATE AD_Process_Para SET ColumnName='SSO_PrincipalConfig_ID', Name='SSO Configuration', Description=NULL, Help=NULL, Placeholder=NULL WHERE AD_Element_ID=203653 AND IsCentrallyMaintained='Y'
;
-- Jul 12, 2023, 10:12:14 AM IST
UPDATE AD_InfoColumn SET ColumnName='SSO_PrincipalConfig_ID', Name='SSO Configuration', Description=NULL, Help=NULL, Placeholder=NULL WHERE AD_Element_ID=203653 AND IsCentrallyMaintained='Y'
;
-- Jul 12, 2023, 10:12:33 AM IST
UPDATE AD_Element SET ColumnName='SSO_PrincipalConfig_UU',Updated=TO_TIMESTAMP('2023-07-12 10:12:33','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Element_ID=203654
;
-- Jul 12, 2023, 10:12:33 AM IST
UPDATE AD_Column SET ColumnName='SSO_PrincipalConfig_UU', Name='SSO Configuration UU', Description=NULL, Help=NULL, Placeholder=NULL WHERE AD_Element_ID=203654
;
-- Jul 12, 2023, 10:12:33 AM IST
UPDATE AD_Process_Para SET ColumnName='SSO_PrincipalConfig_UU', Name='SSO Configuration UU', Description=NULL, Help=NULL, AD_Element_ID=203654 WHERE UPPER(ColumnName)='SSO_PRINCIPALCONFIG_UU' AND IsCentrallyMaintained='Y' AND AD_Element_ID IS NULL
;
-- Jul 12, 2023, 10:12:33 AM IST
UPDATE AD_Process_Para SET ColumnName='SSO_PrincipalConfig_UU', Name='SSO Configuration UU', Description=NULL, Help=NULL, Placeholder=NULL WHERE AD_Element_ID=203654 AND IsCentrallyMaintained='Y'
;
-- Jul 12, 2023, 10:12:33 AM IST
UPDATE AD_InfoColumn SET ColumnName='SSO_PrincipalConfig_UU', Name='SSO Configuration UU', Description=NULL, Help=NULL, Placeholder=NULL WHERE AD_Element_ID=203654 AND IsCentrallyMaintained='Y'
;
ALTER TABLE SSO_PrincipleConfig RENAME TO SSO_PrincipalConfig;
ALTER TABLE SSO_PrincipalConfig RENAME COLUMN SSO_PrincipleConfig_ID TO SSO_PrincipalConfig_ID;
ALTER TABLE SSO_PrincipalConfig RENAME COLUMN SSO_PrincipleConfig_UU TO SSO_PrincipalConfig_UU;
ALTER TABLE sso_principalconfig RENAME CONSTRAINT sso_principleconfig_key TO sso_principalconfig_key;
ALTER TABLE sso_principalconfig RENAME CONSTRAINT sso_principleconfig_uu_idx TO sso_principalconfig_uu_idx;
ALTER TABLE sso_principalconfig RENAME CONSTRAINT sso_principleconfig_isactive_check TO sso_principalconfig_isactive_check;
ALTER TABLE sso_principalconfig RENAME CONSTRAINT sso_principleconfig_isdefault_check TO sso_principalconfig_isdefault_check;

View File

@ -0,0 +1,15 @@
-- IDEMPIERE-5346 SSO Support
SELECT register_migration_script('202307271640_IDEMPIERE-5346.sql') FROM dual;
SET SQLBLANKLINES ON
SET DEFINE OFF
-- Jul 27, 2023, 4:40:22 PM IST
DELETE FROM AD_Field WHERE AD_Field_UU='3b760acd-467f-42ad-9d9c-2bc1887185b8'
;
-- Jul 27, 2023, 4:40:36 PM IST
DELETE FROM AD_Column WHERE AD_Column_UU='2dbe8818-b3c5-470d-885f-7d5cb2eb0c50'
;
ALTER TABLE SSO_PrincipalConfig DROP COLUMN SSO_ApplicationDomain;

View File

@ -0,0 +1,29 @@
-- IDEMPIERE-5346 SSO Support
SELECT register_migration_script('202308071538_IDEMPIERE-5346.sql') FROM dual;
SET SQLBLANKLINES ON
SET DEFINE OFF
-- Aug 7, 2023, 3:38:25 PM IST
UPDATE AD_Column SET DefaultValue='AAS',IsMandatory='Y',Updated=TO_TIMESTAMP('2023-08-07 15:38:25','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=215840
;
-- Aug 7, 2023, 3:54:21 PM IST
ALTER TABLE AD_Client MODIFY AuthenticationType VARCHAR2(10 CHAR) DEFAULT 'AAS'
;
-- Aug 7, 2023, 3:54:21 PM IST
UPDATE AD_Client SET AuthenticationType='AAS' WHERE AuthenticationType IS NULL
;
-- Aug 7, 2023, 3:54:21 PM IST
ALTER TABLE AD_Client MODIFY AuthenticationType NOT NULL
;
-- Aug 17, 2023, 8:34:57 PM IST
INSERT INTO AD_SysConfig (AD_SysConfig_ID,AD_Client_ID,AD_Org_ID,Created,Updated,CreatedBy,UpdatedBy,IsActive,Name,Value,Description,EntityType,ConfigurationLevel,AD_SysConfig_UU) VALUES (200231,0,0,TO_TIMESTAMP('2023-08-17 20:34:56','YYYY-MM-DD HH24:MI:SS'),TO_TIMESTAMP('2023-08-17 20:34:56','YYYY-MM-DD HH24:MI:SS'),100,100,'Y','ENABLE_SSO_IDEMPIERE_MONITOR','N','Enable SSO Authentication Login for iDempiere Monitor','D','S','b9ab5ead-5743-4b62-aaab-6c3ae9d969ac')
;
-- Aug 17, 2023, 8:35:22 PM IST
INSERT INTO AD_SysConfig (AD_SysConfig_ID,AD_Client_ID,AD_Org_ID,Created,Updated,CreatedBy,UpdatedBy,IsActive,Name,Value,Description,EntityType,ConfigurationLevel,AD_SysConfig_UU) VALUES (200232,0,0,TO_TIMESTAMP('2023-08-17 20:35:21','YYYY-MM-DD HH24:MI:SS'),TO_TIMESTAMP('2023-08-17 20:35:21','YYYY-MM-DD HH24:MI:SS'),100,100,'Y','ENABLE_SSO_OSGI_CONSOLE','N','Enable SSO Authentication Login for Felix Web Console','D','S','063c3226-5c7f-40af-ba8d-d594a4ca469c')
;

View File

@ -0,0 +1,473 @@
-- IDEMPIERE-5346 SSO Support
-- Sep 12, 2022, 4:25:30 PM IST
INSERT INTO AD_Table (AD_Table_ID,Name,TableName,LoadSeq,AccessLevel,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,IsSecurityEnabled,IsDeleteable,IsHighVolume,IsView,EntityType,ImportTable,IsChangeLog,ReplicationType,CopyColumnsFromTable,IsCentrallyMaintained,AD_Table_UU,Processing,DatabaseViewDrop,CopyComponentsFromView) VALUES (200360,'SSO Configuration','SSO_PrincipleConfig',0,'4',0,0,'Y',TO_TIMESTAMP('2022-09-12 16:25:29','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2022-09-12 16:25:29','YYYY-MM-DD HH24:MI:SS'),100,'N','Y','N','N','D','N','Y','L','N','Y','e7b0a0ee-c098-4705-a2b7-fdd90adc4e63','N','N','N')
;
-- Sep 12, 2022, 4:25:31 PM IST
INSERT INTO AD_Sequence (Name,CurrentNext,IsAudited,StartNewYear,Description,IsActive,IsTableID,AD_Client_ID,AD_Org_ID,Created,CreatedBy,Updated,UpdatedBy,AD_Sequence_ID,IsAutoSequence,StartNo,IncrementNo,CurrentNextSys,AD_Sequence_UU) VALUES ('SSO_PrincipleConfig',1000000,'N','N','Table SSO_PrincipleConfig','Y','Y',0,0,TO_TIMESTAMP('2022-09-12 16:25:31','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2022-09-12 16:25:31','YYYY-MM-DD HH24:MI:SS'),100,200428,'Y',1000000,1,200000,'f442cac2-0406-4e4d-a73f-159481fbf4ac')
;
-- Sep 12, 2022, 4:26:32 PM IST
INSERT INTO AD_Column (AD_Column_ID,Version,Name,Description,Help,AD_Table_ID,AD_Val_Rule_ID,ColumnName,DefaultValue,FieldLength,IsKey,IsParent,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsEncrypted,AD_Reference_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,AD_Element_ID,IsUpdateable,IsSelectionColumn,EntityType,IsSyncDatabase,IsAlwaysUpdateable,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsAllowCopy,SeqNoSelection,IsToolbarButton,IsSecure,FKConstraintType,IsHtml) VALUES (215286,0,'Client','Client/Tenant for this installation.','A Client is a company or a legal entity. You cannot share data between Clients. Tenant is a synonym for Client.',200360,129,'AD_Client_ID','@#AD_Client_ID@',22,'N','N','N','N','N',0,'N',19,0,0,'Y',TO_TIMESTAMP('2022-09-12 16:26:31','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2022-09-12 16:26:31','YYYY-MM-DD HH24:MI:SS'),100,102,'N','N','D','N','N','N','Y','9922436e-7736-4ac1-a2c6-d48810252c47','N',0,'N','N','D','N')
;
-- Sep 12, 2022, 4:26:51 PM IST
INSERT INTO AD_Column (AD_Column_ID,Version,Name,Description,Help,AD_Table_ID,AD_Val_Rule_ID,ColumnName,DefaultValue,FieldLength,IsKey,IsParent,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsEncrypted,AD_Reference_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,AD_Element_ID,IsUpdateable,IsSelectionColumn,EntityType,IsSyncDatabase,IsAlwaysUpdateable,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsAllowCopy,SeqNoSelection,IsToolbarButton,IsSecure,FKConstraintType,IsHtml) VALUES (215287,0,'Organization','Organizational entity within client','An organization is a unit of your client or legal entity - examples are store, department. You can share data between organizations.',200360,104,'AD_Org_ID','@#AD_Org_ID@',22,'N','N','N','N','N',0,'N',19,0,0,'Y',TO_TIMESTAMP('2022-09-12 16:26:51','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2022-09-12 16:26:51','YYYY-MM-DD HH24:MI:SS'),100,113,'N','N','D','N','N','N','Y','995c1647-2139-4ec2-b6b9-cb553314b7bc','N',0,'N','N','D','N')
;
-- Sep 12, 2022, 4:27:17 PM IST
INSERT INTO AD_Column (AD_Column_ID,Version,Name,Description,Help,AD_Table_ID,ColumnName,DefaultValue,FieldLength,IsKey,IsParent,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsEncrypted,AD_Reference_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,AD_Element_ID,IsUpdateable,IsSelectionColumn,EntityType,IsSyncDatabase,IsAlwaysUpdateable,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsAllowCopy,SeqNoSelection,IsToolbarButton,IsSecure,IsHtml) VALUES (215288,0,'Active','The record is active in the system','There are two methods of making records unavailable in the system: One is to delete the record, the other is to de-activate the record. A de-activated record is not available for selection, but available for reports.
There are two reasons for de-activating and not deleting records:
(1) The system requires the record for audit purposes.
(2) The record is referenced by other records. E.g., you cannot delete a Business Partner, if there are invoices for this partner record existing. You de-activate the Business Partner and prevent that this record is used for future entries.',200360,'IsActive','Y',1,'N','N','N','N','N',0,'N',20,0,0,'Y',TO_TIMESTAMP('2022-09-12 16:27:16','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2022-09-12 16:27:16','YYYY-MM-DD HH24:MI:SS'),100,348,'Y','N','D','N','N','N','Y','4b815b97-a447-4a19-8c0d-f4bc4139d1ee','N',0,'N','N','N')
;
-- Sep 12, 2022, 4:27:34 PM IST
INSERT INTO AD_Column (AD_Column_ID,Version,Name,Description,Help,AD_Table_ID,ColumnName,DefaultValue,FieldLength,IsKey,IsParent,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsEncrypted,AD_Reference_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,AD_Element_ID,IsUpdateable,IsSelectionColumn,EntityType,IsSyncDatabase,IsAlwaysUpdateable,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsAllowCopy,SeqNoSelection,IsToolbarButton,IsSecure,IsHtml) VALUES (215289,0,'Created','Date this record was created','The Created field indicates the date that this record was created.',200360,'Created','SYSDATE',7,'N','N','N','N','N',0,'N',16,0,0,'Y',TO_TIMESTAMP('2022-09-12 16:27:33','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2022-09-12 16:27:33','YYYY-MM-DD HH24:MI:SS'),100,245,'N','N','D','N','N','N','Y','722a2e9a-62cf-47e4-9656-0a9062f32f71','N',0,'N','N','N')
;
-- Sep 12, 2022, 4:27:45 PM IST
INSERT INTO AD_Column (AD_Column_ID,Version,Name,Description,Help,AD_Table_ID,ColumnName,FieldLength,IsKey,IsParent,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsEncrypted,AD_Reference_ID,AD_Reference_Value_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,AD_Element_ID,IsUpdateable,IsSelectionColumn,EntityType,IsSyncDatabase,IsAlwaysUpdateable,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsAllowCopy,SeqNoSelection,IsToolbarButton,IsSecure,FKConstraintType,IsHtml) VALUES (215290,0,'Created By','User who created this records','The Created By field indicates the user who created this record.',200360,'CreatedBy',22,'N','N','N','N','N',0,'N',18,110,0,0,'Y',TO_TIMESTAMP('2022-09-12 16:27:44','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2022-09-12 16:27:44','YYYY-MM-DD HH24:MI:SS'),100,246,'N','N','D','N','N','N','Y','80ad61ed-4304-4783-bf4f-eca0ccda90cc','N',0,'N','N','D','N')
;
-- Sep 12, 2022, 4:28:10 PM IST
INSERT INTO AD_Column (AD_Column_ID,Version,Name,Description,Help,AD_Table_ID,ColumnName,DefaultValue,FieldLength,IsKey,IsParent,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsEncrypted,AD_Reference_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,AD_Element_ID,IsUpdateable,IsSelectionColumn,EntityType,IsSyncDatabase,IsAlwaysUpdateable,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsAllowCopy,SeqNoSelection,IsToolbarButton,IsSecure,IsHtml) VALUES (215291,0,'Updated','Date this record was updated','The Updated field indicates the date that this record was updated.',200360,'Updated','SYSDATE',7,'N','N','N','N','N',0,'N',16,0,0,'Y',TO_TIMESTAMP('2022-09-12 16:28:09','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2022-09-12 16:28:09','YYYY-MM-DD HH24:MI:SS'),100,607,'N','N','D','N','N','N','Y','ae087404-e3a7-4eb8-8574-7aa0d1c5b03f','N',0,'N','N','N')
;
-- Sep 12, 2022, 4:28:20 PM IST
INSERT INTO AD_Column (AD_Column_ID,Version,Name,Description,Help,AD_Table_ID,ColumnName,FieldLength,IsKey,IsParent,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsEncrypted,AD_Reference_ID,AD_Reference_Value_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,AD_Element_ID,IsUpdateable,IsSelectionColumn,EntityType,IsSyncDatabase,IsAlwaysUpdateable,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsAllowCopy,SeqNoSelection,IsToolbarButton,IsSecure,FKConstraintType,IsHtml) VALUES (215292,0,'Updated By','User who updated this records','The Updated By field indicates the user who updated this record.',200360,'UpdatedBy',22,'N','N','N','N','N',0,'N',18,110,0,0,'Y',TO_TIMESTAMP('2022-09-12 16:28:19','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2022-09-12 16:28:19','YYYY-MM-DD HH24:MI:SS'),100,608,'N','N','D','N','N','N','Y','35c922af-4d62-43da-8a6f-1761f16fd6d3','N',0,'N','N','D','N')
;
-- Sep 12, 2022, 4:32:36 PM IST
INSERT INTO AD_Element (AD_Element_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,ColumnName,Name,PrintName,EntityType,AD_Element_UU) VALUES (203653,0,0,'Y',TO_TIMESTAMP('2022-09-12 16:32:35','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2022-09-12 16:32:35','YYYY-MM-DD HH24:MI:SS'),100,'SSO_PrincipleConfig_ID','SSO Configuration','SSO Configuration','D','425b9a47-7bb0-43a7-9229-80055b571c74')
;
-- Sep 12, 2022, 4:32:53 PM IST
INSERT INTO AD_Element (AD_Element_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,ColumnName,Name,PrintName,EntityType,AD_Element_UU) VALUES (203654,0,0,'Y',TO_TIMESTAMP('2022-09-12 16:32:52','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2022-09-12 16:32:52','YYYY-MM-DD HH24:MI:SS'),100,'SSO_PrincipleConfig_UU','SSO Configuration UU','SSO Configuration UU','D','c54393fb-1913-4660-9672-48f08f2a6026')
;
-- Sep 12, 2022, 4:36:00 PM IST
INSERT INTO AD_Column (AD_Column_ID,Version,Name,AD_Table_ID,ColumnName,FieldLength,IsKey,IsParent,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsEncrypted,AD_Reference_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,AD_Element_ID,IsUpdateable,IsSelectionColumn,EntityType,IsSyncDatabase,IsAlwaysUpdateable,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsAllowCopy,SeqNoSelection,IsToolbarButton,IsSecure,FKConstraintType,IsHtml) VALUES (215294,0,'SSO Configuration UU',200360,'SSO_PrincipleConfig_UU',36,'N','N','N','N','N',0,'N',10,0,0,'Y',TO_TIMESTAMP('2022-09-12 16:36:00','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2022-09-12 16:36:00','YYYY-MM-DD HH24:MI:SS'),100,203654,'N','N','D','N','N','N','Y','29915d20-0fb9-4548-8821-02bf067c7fc8','N',0,'N','N','N','N')
;
-- Sep 12, 2022, 4:39:26 PM IST
INSERT INTO AD_Column (AD_Column_ID,Version,Name,Description,Help,AD_Table_ID,ColumnName,FieldLength,IsKey,IsParent,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsEncrypted,AD_Reference_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,AD_Element_ID,IsUpdateable,IsSelectionColumn,EntityType,IsSyncDatabase,IsAlwaysUpdateable,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsAllowCopy,SeqNoSelection,IsToolbarButton,IsSecure,IsHtml) VALUES (215296,0,'Name','Alphanumeric identifier of the entity','The name of an entity (record) is used as an default search option in addition to the search key. The name is up to 60 characters in length.',200360,'Name',60,'N','N','N','N','Y',0,'N',10,0,0,'Y',TO_TIMESTAMP('2022-09-12 16:39:25','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2022-09-12 16:39:25','YYYY-MM-DD HH24:MI:SS'),100,469,'Y','Y','D','N','N','N','Y','9d805126-1dbd-4379-b4ba-e83d9e84112d','Y',20,'N','N','N')
;
-- Sep 12, 2022, 4:42:57 PM IST
INSERT INTO AD_Element (AD_Element_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,ColumnName,Name,Description,PrintName,EntityType,AD_Element_UU) VALUES (203655,0,0,'Y',TO_TIMESTAMP('2022-09-12 16:42:56','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2022-09-12 16:42:56','YYYY-MM-DD HH24:MI:SS'),100,'SSO_AuthorizationTenantID','Tenant ID','SSO Tenant ID','Tenant ID','D','3d476f0b-fc9a-41fe-a934-708ff7b09924')
;
-- Sep 12, 2022, 4:43:57 PM IST
INSERT INTO AD_Column (AD_Column_ID,Version,Name,Description,AD_Table_ID,ColumnName,FieldLength,IsKey,IsParent,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsEncrypted,AD_Reference_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,AD_Element_ID,IsUpdateable,IsSelectionColumn,EntityType,IsSyncDatabase,IsAlwaysUpdateable,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsAllowCopy,SeqNoSelection,IsToolbarButton,IsSecure,FKConstraintType,IsHtml) VALUES (215297,0,'Tenant ID','SSO Tenant ID',200360,'SSO_AuthorizationTenantID',100,'N','N','N','N','N',0,'N',10,0,0,'Y',TO_TIMESTAMP('2022-09-12 16:43:56','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2022-09-12 16:43:56','YYYY-MM-DD HH24:MI:SS'),100,203655,'Y','N','D','N','N','N','N','2e32c2c9-c933-4531-85b8-9fcd5e32cb00','N',0,'N','N','N','N')
;
-- Sep 12, 2022, 4:45:14 PM IST
INSERT INTO AD_Element (AD_Element_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,ColumnName,Name,Description,PrintName,EntityType,AD_Element_UU) VALUES (203656,0,0,'Y',TO_TIMESTAMP('2022-09-12 16:45:13','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2022-09-12 16:45:13','YYYY-MM-DD HH24:MI:SS'),100,'SSO_ApplicationClientID','Application Client ID','SSO Application Client ID','Application Client ID','D','3747d76d-0432-4981-a8d4-b35b26903ad1')
;
-- Sep 12, 2022, 4:45:58 PM IST
INSERT INTO AD_Column (AD_Column_ID,Version,Name,Description,AD_Table_ID,ColumnName,FieldLength,IsKey,IsParent,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsEncrypted,AD_Reference_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,AD_Element_ID,IsUpdateable,IsSelectionColumn,EntityType,IsSyncDatabase,IsAlwaysUpdateable,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsAllowCopy,SeqNoSelection,IsToolbarButton,IsSecure,FKConstraintType,IsHtml) VALUES (215298,0,'Application Client ID','SSO Application Client ID',200360,'SSO_ApplicationClientID',100,'N','N','N','N','N',0,'N',10,0,0,'Y',TO_TIMESTAMP('2022-09-12 16:45:57','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2022-09-12 16:45:57','YYYY-MM-DD HH24:MI:SS'),100,203656,'Y','N','D','N','Y','N','N','39975d3e-0a1f-407f-9067-50f7dcfb6bef','N',0,'N','N','N','N')
;
-- Sep 12, 2022, 4:47:18 PM IST
INSERT INTO AD_Element (AD_Element_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,ColumnName,Name,Description,PrintName,EntityType,AD_Element_UU) VALUES (203657,0,0,'Y',TO_TIMESTAMP('2022-09-12 16:47:17','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2022-09-12 16:47:17','YYYY-MM-DD HH24:MI:SS'),100,'SSO_ApplicationSecretKey','Application Secret Key','SSO Application Secret Key','Application Secret Key','D','d5dd4ee2-f12b-46e3-a972-d8f2731bc540')
;
-- Sep 12, 2022, 4:48:17 PM IST
UPDATE AD_Column SET IsMandatory='Y',Updated=TO_TIMESTAMP('2022-09-12 16:48:17','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=215298
;
-- Sep 12, 2022, 4:48:48 PM IST
UPDATE AD_Column SET IsMandatory='Y',Updated=TO_TIMESTAMP('2022-09-12 16:48:48','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=215297
;
-- Sep 12, 2022, 4:51:27 PM IST
INSERT INTO AD_Element (AD_Element_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,ColumnName,Name,Description,PrintName,EntityType,AD_Element_UU) VALUES (203658,0,0,'Y',TO_TIMESTAMP('2022-09-12 16:51:27','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2022-09-12 16:51:27','YYYY-MM-DD HH24:MI:SS'),100,'SSO_ApplicationRedirectURIs','Application Redirect URIs','SSO Application Redirect URIs','Application Redirect URIs','D','b2c0bcba-10c2-4a81-bcec-84f9d6c3522c')
;
-- Sep 12, 2022, 4:52:05 PM IST
INSERT INTO AD_Column (AD_Column_ID,Version,Name,Description,AD_Table_ID,ColumnName,FieldLength,IsKey,IsParent,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsEncrypted,AD_Reference_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,AD_Element_ID,IsUpdateable,IsSelectionColumn,EntityType,IsSyncDatabase,IsAlwaysUpdateable,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsAllowCopy,SeqNoSelection,IsToolbarButton,IsSecure,FKConstraintType,IsHtml) VALUES (215300,0,'Application Redirect URIs','SSO Application Redirect URIs',200360,'SSO_ApplicationRedirectURIs',1000,'N','N','N','N','N',0,'N',10,0,0,'Y',TO_TIMESTAMP('2022-09-12 16:52:04','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2022-09-12 16:52:04','YYYY-MM-DD HH24:MI:SS'),100,203658,'Y','N','D','N','Y','N','N','d407ac13-80ef-4af8-92eb-343f63ea13fc','N',0,'N','N','N','N')
;
-- Sep 12, 2022, 4:54:54 PM IST
INSERT INTO AD_Element (AD_Element_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,ColumnName,Name,Description,PrintName,EntityType,AD_Element_UU) VALUES (203659,0,0,'Y',TO_TIMESTAMP('2022-09-12 16:54:53','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2022-09-12 16:54:53','YYYY-MM-DD HH24:MI:SS'),100,'SSO_ApplicationLogoutURL','Application Logout URL','SSO Application Logout URL','Application Logout URL','D','343fd50a-b2cb-4e0c-ae61-ecc45c40bbca')
;
-- Sep 12, 2022, 4:56:02 PM IST
INSERT INTO AD_Column (AD_Column_ID,Version,Name,Description,AD_Table_ID,ColumnName,FieldLength,IsKey,IsParent,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsEncrypted,AD_Reference_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,AD_Element_ID,IsUpdateable,IsSelectionColumn,EntityType,IsSyncDatabase,IsAlwaysUpdateable,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsAllowCopy,SeqNoSelection,IsToolbarButton,IsSecure,FKConstraintType,IsHtml) VALUES (215301,0,'Application Logout URL','SSO Application Logout URL',200360,'SSO_ApplicationLogoutURL',1000,'N','N','N','N','N',0,'N',10,0,0,'Y',TO_TIMESTAMP('2022-09-12 16:56:01','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2022-09-12 16:56:01','YYYY-MM-DD HH24:MI:SS'),100,203659,'Y','N','D','N','Y','N','N','c24bd056-beca-4fb6-ae85-660115478486','N',0,'N','N','N','N')
;
-- Sep 12, 2022, 5:03:36 PM IST
INSERT INTO AD_Window (AD_Window_ID,Name,Description,Help,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,WindowType,Processing,EntityType,IsSOTrx,IsDefault,WinHeight,WinWidth,IsBetaFunctionality,AD_Window_UU) VALUES (200132,'SSO Configuration','Single sign-on Configuration','Single sign-on is an authentication scheme that allows a user to log in with a single ID to any of several related, yet independent, software systems.',0,0,'Y',TO_TIMESTAMP('2022-09-12 17:03:35','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2022-09-12 17:03:35','YYYY-MM-DD HH24:MI:SS'),100,'M','N','D','Y','N',0,0,'N','60c3edde-af29-44d9-bc0c-9dab28f5dc32')
;
-- Sep 12, 2022, 5:04:09 PM IST
INSERT INTO AD_Tab (AD_Tab_ID,Name,AD_Window_ID,SeqNo,IsSingleRow,AD_Table_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,HasTree,IsInfoTab,IsTranslationTab,IsReadOnly,Processing,ImportFields,TabLevel,IsSortTab,EntityType,IsInsertRecord,IsAdvancedTab,AD_Tab_UU,TreeDisplayedOn,IsLookupOnlySelection,IsAllowAdvancedLookup,MaxQueryRecords) VALUES (200328,'SSO Configuration',200132,10,'Y',200360,0,0,'Y',TO_TIMESTAMP('2022-09-12 17:04:08','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2022-09-12 17:04:08','YYYY-MM-DD HH24:MI:SS'),100,'N','N','N','N','N','N',0,'N','D','Y','N','29ac2590-d681-4a3e-8b04-caf5269dda86','B','N','Y',0)
;
-- Sep 12, 2022, 5:04:22 PM IST
INSERT INTO AD_Field (AD_Field_ID,Name,Description,Help,AD_Tab_ID,AD_Column_ID,IsDisplayed,DisplayLength,SeqNo,IsSameLine,IsHeading,IsFieldOnly,IsEncrypted,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,IsReadOnly,IsCentrallyMaintained,EntityType,AD_Field_UU,IsDisplayedGrid,ColumnSpan) VALUES (207191,'Client','Client/Tenant for this installation.','A Client is a company or a legal entity. You cannot share data between Clients. Tenant is a synonym for Client.',200328,215286,'Y',22,10,'N','N','N','N',0,0,'Y',TO_TIMESTAMP('2022-09-12 17:04:21','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2022-09-12 17:04:21','YYYY-MM-DD HH24:MI:SS'),100,'N','Y','D','6b76faa4-3d47-460c-b6a9-be25ee42157f','N',2)
;
-- Sep 12, 2022, 5:04:22 PM IST
INSERT INTO AD_Field (AD_Field_ID,Name,Description,Help,AD_Tab_ID,AD_Column_ID,IsDisplayed,DisplayLength,SeqNo,IsSameLine,IsHeading,IsFieldOnly,IsEncrypted,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,IsReadOnly,IsCentrallyMaintained,EntityType,AD_Field_UU,IsAllowCopy,IsDisplayedGrid,XPosition,ColumnSpan) VALUES (207192,'Organization','Organizational entity within client','An organization is a unit of your client or legal entity - examples are store, department. You can share data between organizations.',200328,215287,'Y',22,20,'N','N','N','N',0,0,'Y',TO_TIMESTAMP('2022-09-12 17:04:22','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2022-09-12 17:04:22','YYYY-MM-DD HH24:MI:SS'),100,'N','Y','D','68d8d75d-7d18-47b3-86c1-9146bfeb5bb2','Y','N',4,2)
;
-- Sep 12, 2022, 5:04:24 PM IST
INSERT INTO AD_Field (AD_Field_ID,Name,Description,Help,AD_Tab_ID,AD_Column_ID,IsDisplayed,DisplayLength,SeqNo,IsSameLine,IsHeading,IsFieldOnly,IsEncrypted,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,IsReadOnly,IsCentrallyMaintained,EntityType,AD_Field_UU,IsDisplayedGrid,SeqNoGrid,ColumnSpan) VALUES (207194,'Name','Alphanumeric identifier of the entity','The name of an entity (record) is used as an default search option in addition to the search key. The name is up to 60 characters in length.',200328,215296,'Y',60,40,'N','N','N','N',0,0,'Y',TO_TIMESTAMP('2022-09-12 17:04:23','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2022-09-12 17:04:23','YYYY-MM-DD HH24:MI:SS'),100,'N','Y','D','bf3c6b23-a1de-4c0a-afe8-81aa42826d5c','Y',20,5)
;
-- Sep 12, 2022, 5:04:25 PM IST
INSERT INTO AD_Field (AD_Field_ID,Name,AD_Tab_ID,AD_Column_ID,IsDisplayed,DisplayLength,SeqNo,IsSameLine,IsHeading,IsFieldOnly,IsEncrypted,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,IsReadOnly,IsCentrallyMaintained,EntityType,AD_Field_UU,IsDisplayedGrid,SeqNoGrid,ColumnSpan) VALUES (207195,'SSO Configuration UU',200328,215294,'Y',36,50,'N','N','N','N',0,0,'Y',TO_TIMESTAMP('2022-09-12 17:04:24','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2022-09-12 17:04:24','YYYY-MM-DD HH24:MI:SS'),100,'N','Y','D','d2d7b7a8-2d3a-473e-b4c9-6081967b65c1','Y',30,2)
;
-- Sep 12, 2022, 5:04:25 PM IST
INSERT INTO AD_Field (AD_Field_ID,Name,Description,AD_Tab_ID,AD_Column_ID,IsDisplayed,DisplayLength,SeqNo,IsSameLine,IsHeading,IsFieldOnly,IsEncrypted,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,IsReadOnly,IsCentrallyMaintained,EntityType,AD_Field_UU,IsDisplayedGrid,SeqNoGrid,ColumnSpan) VALUES (207196,'Tenant ID','SSO Tenant ID',200328,215297,'Y',100,60,'N','N','N','N',0,0,'Y',TO_TIMESTAMP('2022-09-12 17:04:25','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2022-09-12 17:04:25','YYYY-MM-DD HH24:MI:SS'),100,'N','Y','D','87c18271-db99-413d-80a7-8a0e78484e0d','Y',40,5)
;
-- Sep 12, 2022, 5:04:26 PM IST
INSERT INTO AD_Field (AD_Field_ID,Name,Description,AD_Tab_ID,AD_Column_ID,IsDisplayed,DisplayLength,SeqNo,IsSameLine,IsHeading,IsFieldOnly,IsEncrypted,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,IsReadOnly,IsCentrallyMaintained,EntityType,AD_Field_UU,IsDisplayedGrid,SeqNoGrid,ColumnSpan) VALUES (207197,'Application Client ID','SSO Application Client ID',200328,215298,'Y',100,70,'N','N','N','N',0,0,'Y',TO_TIMESTAMP('2022-09-12 17:04:25','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2022-09-12 17:04:25','YYYY-MM-DD HH24:MI:SS'),100,'N','Y','D','fe330472-2b33-4ba4-b162-c375d569cda1','Y',50,5)
;
-- Sep 12, 2022, 5:04:27 PM IST
INSERT INTO AD_Field (AD_Field_ID,Name,Description,AD_Tab_ID,AD_Column_ID,IsDisplayed,DisplayLength,SeqNo,IsSameLine,IsHeading,IsFieldOnly,IsEncrypted,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,IsReadOnly,IsCentrallyMaintained,EntityType,AD_Field_UU,IsDisplayedGrid,SeqNoGrid,ColumnSpan) VALUES (207198,'Application Redirect URIs','SSO Application Redirect URIs',200328,215300,'Y',1000,80,'N','N','N','N',0,0,'Y',TO_TIMESTAMP('2022-09-12 17:04:26','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2022-09-12 17:04:26','YYYY-MM-DD HH24:MI:SS'),100,'N','Y','D','bc2ba7bc-d194-42de-83f7-6ae40e659436','Y',60,5)
;
-- Sep 12, 2022, 5:04:27 PM IST
INSERT INTO AD_Field (AD_Field_ID,Name,Description,AD_Tab_ID,AD_Column_ID,IsDisplayed,DisplayLength,SeqNo,IsSameLine,IsHeading,IsFieldOnly,IsEncrypted,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,IsReadOnly,IsCentrallyMaintained,EntityType,AD_Field_UU,IsDisplayedGrid,SeqNoGrid,ColumnSpan) VALUES (207199,'Application Logout URL','SSO Application Logout URL',200328,215301,'Y',1000,90,'N','N','N','N',0,0,'Y',TO_TIMESTAMP('2022-09-12 17:04:27','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2022-09-12 17:04:27','YYYY-MM-DD HH24:MI:SS'),100,'N','Y','D','266b349b-5040-4e62-a2bd-12cc8d1b26a5','Y',70,5)
;
-- Sep 12, 2022, 5:04:28 PM IST
INSERT INTO AD_Field (AD_Field_ID,Name,Description,Help,AD_Tab_ID,AD_Column_ID,IsDisplayed,DisplayLength,SeqNo,IsSameLine,IsHeading,IsFieldOnly,IsEncrypted,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,IsReadOnly,IsCentrallyMaintained,EntityType,AD_Field_UU,IsDisplayedGrid,SeqNoGrid,XPosition,ColumnSpan) VALUES (207200,'Active','The record is active in the system','There are two methods of making records unavailable in the system: One is to delete the record, the other is to de-activate the record. A de-activated record is not available for selection, but available for reports.
There are two reasons for de-activating and not deleting records:
(1) The system requires the record for audit purposes.
(2) The record is referenced by other records. E.g., you cannot delete a Business Partner, if there are invoices for this partner record existing. You de-activate the Business Partner and prevent that this record is used for future entries.',200328,215288,'Y',1,100,'N','N','N','N',0,0,'Y',TO_TIMESTAMP('2022-09-12 17:04:27','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2022-09-12 17:04:27','YYYY-MM-DD HH24:MI:SS'),100,'N','Y','D','665490df-8b3d-4e40-a9f2-659e3e9ead95','Y',80,2,2)
;
-- Sep 12, 2022, 5:06:28 PM IST
INSERT INTO AD_Column (AD_Column_ID,Version,Name,Description,AD_Table_ID,ColumnName,FieldLength,IsKey,IsParent,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsEncrypted,AD_Reference_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,AD_Element_ID,IsUpdateable,IsSelectionColumn,EntityType,IsSyncDatabase,IsAlwaysUpdateable,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsAllowCopy,SeqNoSelection,IsToolbarButton,IsSecure,IsHtml) VALUES (215302,0,'Application Secret Key','SSO Application Secret Key',200360,'SSO_ApplicationSecretKey',100,'N','N','N','N','N',0,'N',10,0,0,'Y',TO_TIMESTAMP('2022-09-12 17:06:28','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2022-09-12 17:06:28','YYYY-MM-DD HH24:MI:SS'),100,203657,'Y','N','D','N','N','N','N','a1c453e1-42f2-4131-810a-3e9f6ea6c81e','N',0,'N','Y','N')
;
-- Sep 12, 2022, 5:06:35 PM IST
CREATE TABLE SSO_PrincipleConfig (AD_Client_ID NUMERIC(10) DEFAULT NULL , AD_Org_ID NUMERIC(10) DEFAULT NULL , Created TIMESTAMP DEFAULT statement_timestamp(), CreatedBy NUMERIC(10) DEFAULT NULL , IsActive CHAR(1) DEFAULT 'Y' CHECK (IsActive IN ('Y','N')), Name VARCHAR(60) DEFAULT NULL , SSO_ApplicationClientID VARCHAR(100) NOT NULL, SSO_ApplicationLogoutURL VARCHAR(1000) DEFAULT NULL , SSO_ApplicationRedirectURIs VARCHAR(1000) DEFAULT NULL , SSO_ApplicationSecretKey VARCHAR(100) DEFAULT NULL , SSO_AuthorizationTenantID VARCHAR(100) NOT NULL, SSO_PrincipleConfig_ID NUMERIC(10) DEFAULT NULL , SSO_PrincipleConfig_UU VARCHAR(36) DEFAULT NULL , Updated TIMESTAMP DEFAULT statement_timestamp(), UpdatedBy NUMERIC(10) DEFAULT NULL , CONSTRAINT SSO_PrincipleConfig_Key PRIMARY KEY (SSO_PrincipleConfig_ID), CONSTRAINT SSO_PrincipleConfig_UU_idx UNIQUE (SSO_PrincipleConfig_UU))
;
-- Sep 12, 2022, 5:06:51 PM IST
INSERT INTO AD_Field (AD_Field_ID,Name,Description,AD_Tab_ID,AD_Column_ID,IsDisplayed,DisplayLength,SeqNo,IsSameLine,IsHeading,IsFieldOnly,IsEncrypted,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,IsReadOnly,IsCentrallyMaintained,EntityType,AD_Field_UU,IsDisplayedGrid,SeqNoGrid,ColumnSpan) VALUES (207201,'Application Secret Key','SSO Application Secret Key',200328,215302,'Y',100,110,'N','N','N','N',0,0,'Y',TO_TIMESTAMP('2022-09-12 17:06:50','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2022-09-12 17:06:50','YYYY-MM-DD HH24:MI:SS'),100,'N','Y','D','fbb79fdd-d901-4376-b7d9-1590714388a2','Y',90,5)
;
-- Sep 12, 2022, 5:07:03 PM IST
UPDATE AD_Field SET IsEncrypted='Y', AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2022-09-12 17:07:03','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=207201
;
-- Sep 12, 2022, 5:07:41 PM IST
UPDATE AD_Field SET IsDisplayed='Y', SeqNo=40, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, XPosition=5, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2022-09-12 17:07:41','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=207200
;
-- Sep 12, 2022, 5:07:41 PM IST
UPDATE AD_Field SET SeqNo=50, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2022-09-12 17:07:41','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=207194
;
-- Sep 12, 2022, 5:07:41 PM IST
UPDATE AD_Field SET IsDisplayed='Y', SeqNo=80, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, XPosition=1, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2022-09-12 17:07:41','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=207201
;
-- Sep 12, 2022, 5:07:41 PM IST
UPDATE AD_Field SET SeqNo=90, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2022-09-12 17:07:41','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=207198
;
-- Sep 12, 2022, 5:07:41 PM IST
UPDATE AD_Field SET SeqNo=100, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2022-09-12 17:07:41','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=207199
;
-- Sep 12, 2022, 5:07:41 PM IST
UPDATE AD_Field SET IsDisplayed='N', SeqNo=0, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, XPosition=1, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2022-09-12 17:07:41','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=207195
;
-- Sep 12, 2022, 5:08:48 PM IST
INSERT INTO AD_Column (AD_Column_ID,Version,Name,Description,Help,AD_Table_ID,ColumnName,DefaultValue,FieldLength,IsKey,IsParent,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsEncrypted,AD_Reference_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,AD_Element_ID,IsUpdateable,IsSelectionColumn,EntityType,IsSyncDatabase,IsAlwaysUpdateable,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsAllowCopy,SeqNoSelection,IsToolbarButton,IsSecure,IsHtml) VALUES (215303,0,'Default','Default value','The Default Checkbox indicates if this record will be used as a default value.',200360,'IsDefault','N',1,'N','N','N','N','N',0,'N',20,0,0,'Y',TO_TIMESTAMP('2022-09-12 17:08:47','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2022-09-12 17:08:47','YYYY-MM-DD HH24:MI:SS'),100,1103,'Y','N','D','N','Y','N','N','20322354-658d-4f1c-a843-63210d791833','N',0,'N','N','N')
;
-- Sep 12, 2022, 5:08:54 PM IST
ALTER TABLE SSO_PrincipleConfig ADD COLUMN IsDefault CHAR(1) DEFAULT 'N' CHECK (IsDefault IN ('Y','N'))
;
-- Sep 12, 2022, 5:09:07 PM IST
INSERT INTO AD_Field (AD_Field_ID,Name,Description,Help,AD_Tab_ID,AD_Column_ID,IsDisplayed,DisplayLength,SeqNo,IsSameLine,IsHeading,IsFieldOnly,IsEncrypted,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,IsReadOnly,IsCentrallyMaintained,EntityType,AD_Field_UU,IsDisplayedGrid,SeqNoGrid,XPosition,ColumnSpan) VALUES (207202,'Default','Default value','The Default Checkbox indicates if this record will be used as a default value.',200328,215303,'Y',1,110,'N','N','N','N',0,0,'Y',TO_TIMESTAMP('2022-09-12 17:09:06','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2022-09-12 17:09:06','YYYY-MM-DD HH24:MI:SS'),100,'N','Y','D','92e8c5be-c0ec-4ab8-8b2c-75b50580fd0e','Y',100,2,2)
;
-- Sep 12, 2022, 5:09:40 PM IST
UPDATE AD_Field SET IsDisplayed='Y', SeqNo=40, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, XPosition=4, ColumnSpan=2, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2022-09-12 17:09:40','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=207194
;
-- Sep 12, 2022, 5:09:40 PM IST
UPDATE AD_Field SET IsDisplayed='Y', SeqNo=50, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, XPosition=2, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2022-09-12 17:09:40','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=207200
;
-- Sep 12, 2022, 5:09:40 PM IST
UPDATE AD_Field SET IsDisplayed='Y', SeqNo=60, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, XPosition=5, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2022-09-12 17:09:40','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=207202
;
-- Sep 12, 2022, 5:09:40 PM IST
UPDATE AD_Field SET SeqNo=70, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2022-09-12 17:09:40','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=207196
;
-- Sep 12, 2022, 5:09:40 PM IST
UPDATE AD_Field SET SeqNo=80, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2022-09-12 17:09:40','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=207197
;
-- Sep 12, 2022, 5:09:40 PM IST
UPDATE AD_Field SET SeqNo=90, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2022-09-12 17:09:40','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=207201
;
-- Sep 12, 2022, 5:09:40 PM IST
UPDATE AD_Field SET SeqNo=100, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2022-09-12 17:09:40','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=207198
;
-- Sep 12, 2022, 5:09:40 PM IST
UPDATE AD_Field SET SeqNo=110, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2022-09-12 17:09:40','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=207199
;
-- Sep 12, 2022, 7:02:49 PM IST
UPDATE AD_Column SET IsMandatory='Y',Updated=TO_TIMESTAMP('2022-09-12 19:02:49','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=215302
;
-- Sep 12, 2022, 7:08:59 PM IST
INSERT INTO AD_Column (AD_Column_ID,Version,Name,AD_Table_ID,ColumnName,FieldLength,IsKey,IsParent,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsEncrypted,AD_Reference_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,AD_Element_ID,IsUpdateable,IsSelectionColumn,EntityType,IsSyncDatabase,IsAlwaysUpdateable,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsAllowCopy,SeqNoSelection,IsToolbarButton,IsSecure,FKConstraintType,IsHtml) VALUES (215304,0,'SSO Configuration',200360,'SSO_PrincipleConfig_ID',22,'Y','N','Y','N','N',0,'N',13,0,0,'Y',TO_TIMESTAMP('2022-09-12 19:08:58','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2022-09-12 19:08:58','YYYY-MM-DD HH24:MI:SS'),100,203653,'N','N','D','N','N','N','Y','55dd0703-1d94-4de9-abc2-cd4380265192','N',0,'N','N','N','N')
;
-- Sep 12, 2022, 7:09:00 PM IST
INSERT INTO t_alter_column values('sso_principleconfig','SSO_PrincipleConfig_ID','NUMERIC(10)',null,null)
;
-- Sep 12, 2022, 7:10:54 PM IST
UPDATE AD_Column SET IsUpdateable='N', IsAllowLogging='N',Updated=TO_TIMESTAMP('2022-09-12 19:10:54','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=215304
;
-- Sep 12, 2022, 7:15:11 PM IST
INSERT INTO AD_Field (AD_Field_ID,Name,AD_Tab_ID,AD_Column_ID,IsDisplayed,DisplayLength,IsSameLine,IsHeading,IsFieldOnly,IsEncrypted,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,IsReadOnly,IsCentrallyMaintained,EntityType,AD_Field_UU,IsDisplayedGrid,ColumnSpan) VALUES (207203,'SSO Configuration',200328,215304,'N',22,'N','N','N','N',0,0,'Y',TO_TIMESTAMP('2022-09-12 19:15:10','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2022-09-12 19:15:10','YYYY-MM-DD HH24:MI:SS'),100,'N','Y','D','7ce5cdab-9590-4185-a300-6a8a8faf4c8e','N',2)
;
-- Sep 12, 2022, 7:15:20 PM IST
UPDATE AD_Field SET SeqNo=0, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2022-09-12 19:15:20','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=207203
;
-- Sep 12, 2022, 7:21:23 PM IST
UPDATE AD_Column SET IsMandatory='Y',Updated=TO_TIMESTAMP('2022-09-12 19:21:23','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=215300
;
-- Sep 12, 2022, 6:22:56 PM IST
INSERT INTO AD_Menu (AD_Menu_ID,Name,"action",AD_Window_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,IsSummary,IsSOTrx,IsReadOnly,EntityType,IsCentrallyMaintained,AD_Menu_UU) VALUES (200213,'SSO Configuration','W',200132,0,0,'Y',TO_TIMESTAMP('2022-09-12 18:22:55','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2022-09-12 18:22:55','YYYY-MM-DD HH24:MI:SS'),100,'N','Y','N','D','Y','7ce4cdf9-d345-4a4f-919b-698661ea99f0')
;
-- Sep 12, 2022, 6:22:56 PM IST
INSERT INTO AD_TreeNodeMM (AD_Client_ID,AD_Org_ID, IsActive,Created,CreatedBy,Updated,UpdatedBy, AD_Tree_ID, Node_ID, Parent_ID, SeqNo, AD_TreeNodeMM_UU) SELECT t.AD_Client_ID, 0, 'Y', statement_timestamp(), 100, statement_timestamp(), 100,t.AD_Tree_ID, 200213, 0, 999, Generate_UUID() FROM AD_Tree t WHERE t.AD_Client_ID=0 AND t.IsActive='Y' AND t.IsAllNodes='Y' AND t.TreeType='MM' AND NOT EXISTS (SELECT * FROM AD_TreeNodeMM e WHERE e.AD_Tree_ID=t.AD_Tree_ID AND Node_ID=200213)
;
-- Sep 12, 2022, 7:00:55 PM IST
INSERT INTO AD_SysConfig (AD_SysConfig_ID,AD_Client_ID,AD_Org_ID,Created,Updated,CreatedBy,UpdatedBy,IsActive,Name,Value,Description,EntityType,ConfigurationLevel,AD_SysConfig_UU) VALUES (200205,0,0,TO_TIMESTAMP('2022-09-12 19:00:54','YYYY-MM-DD HH24:MI:SS'),TO_TIMESTAMP('2022-09-12 19:00:54','YYYY-MM-DD HH24:MI:SS'),100,100,'Y','ENABLE_SSO','N','Enable SSO Authentication Login','D','S','51cf2755-a4cb-49bf-b08e-c1ef54c1e0f8')
;
-- Sep 15, 2022, 11:56:42 AM IST
INSERT INTO AD_Element (AD_Element_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,ColumnName,Name,Description,PrintName,EntityType,AD_Element_UU) VALUES (203670,0,0,'Y',TO_TIMESTAMP('2022-09-15 11:56:41','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2022-09-15 11:56:41','YYYY-MM-DD HH24:MI:SS'),100,'SSO_Provider','SSO Provider','Single Sign-On (SSO) Providers ( Microsoft Azure , Google, Jump Cloud etc..)','SSO Provider','D','959ffea1-effb-434a-8480-f035fca65815')
;
-- Sep 15, 2022, 11:58:07 AM IST
INSERT INTO AD_Reference (AD_Reference_ID,Name,ValidationType,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,EntityType,IsOrderByValue,AD_Reference_UU) VALUES (200213,'SSO Provider List','L',0,0,'Y',TO_TIMESTAMP('2022-09-15 11:58:06','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2022-09-15 11:58:06','YYYY-MM-DD HH24:MI:SS'),100,'D','N','f12db9ec-7c5c-46a7-a2ba-d01b4043dae2')
;
-- Sep 15, 2022, 11:58:44 AM IST
INSERT INTO AD_Column (AD_Column_ID,Version,Name,Description,AD_Table_ID,ColumnName,FieldLength,IsKey,IsParent,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsEncrypted,AD_Reference_ID,AD_Reference_Value_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,AD_Element_ID,IsUpdateable,IsSelectionColumn,EntityType,IsSyncDatabase,IsAlwaysUpdateable,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsAllowCopy,SeqNoSelection,IsToolbarButton,IsSecure,FKConstraintType,IsHtml) VALUES (215355,0,'SSO Provider','Single Sign-On (SSO) Providers ( Microsoft Azure , Google, Jump Cloud etc..)',200360,'SSO_Provider',22,'N','N','Y','N','N',0,'N',17,200213,0,0,'Y',TO_TIMESTAMP('2022-09-15 11:58:42','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2022-09-15 11:58:42','YYYY-MM-DD HH24:MI:SS'),100,203670,'Y','N','D','N','N','N','N','88889119-20f7-4261-9bc7-344c0c7fc9ff','N',0,'N','N','N','N')
;
-- Sep 15, 2022, 11:58:46 AM IST
ALTER TABLE SSO_PrincipleConfig ADD COLUMN SSO_Provider VARCHAR(22) NOT NULL
;
-- Sep 15, 2022, 11:59:03 AM IST
INSERT INTO AD_Field (AD_Field_ID,Name,Description,AD_Tab_ID,AD_Column_ID,IsDisplayed,DisplayLength,SeqNo,IsSameLine,IsHeading,IsFieldOnly,IsEncrypted,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,IsReadOnly,IsCentrallyMaintained,EntityType,AD_Field_UU,IsDisplayedGrid,SeqNoGrid,ColumnSpan) VALUES (207242,'SSO Provider','Single Sign-On (SSO) Providers ( Microsoft Azure , Google, Jump Cloud etc..)',200328,215355,'Y',22,120,'N','N','N','N',0,0,'Y',TO_TIMESTAMP('2022-09-15 11:59:02','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2022-09-15 11:59:02','YYYY-MM-DD HH24:MI:SS'),100,'N','Y','D','425a912e-b334-46b6-863f-ebd31bb46003','Y',110,2)
;
-- Sep 15, 2022, 11:59:39 AM IST
UPDATE AD_Field SET SeqNo=30, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, SeqNoGrid=10, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2022-09-15 11:59:39','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=207242
;
-- Sep 19, 2022, 3:49:07 PM IST
INSERT INTO AD_Message (MsgType,MsgText,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,AD_Message_ID,Value,EntityType,AD_Message_UU) VALUES ('E','The user has no access',0,0,'Y',TO_TIMESTAMP('2022-09-19 15:49:05','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2022-09-19 15:49:05','YYYY-MM-DD HH24:MI:SS'),100,200784,'UserNoRoleError','D','241a07d4-4b46-4666-b7a9-277edbcdefa5')
;
-- Sep 19, 2022, 3:49:32 PM IST
INSERT INTO AD_Message (MsgType,MsgText,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,AD_Message_ID,Value,EntityType,AD_Message_UU) VALUES ('E','User not found',0,0,'Y',TO_TIMESTAMP('2022-09-19 15:49:31','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2022-09-19 15:49:31','YYYY-MM-DD HH24:MI:SS'),100,200785,'UserNotFoundError','D','64499310-0505-4cc3-8089-b6e64011d99a')
;
-- Oct 18, 2022, 11:37:28 AM IST
UPDATE AD_Column SET IsMandatory='N',Updated=TO_TIMESTAMP('2022-10-18 11:37:28','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=215298
;
-- Oct 18, 2022, 11:37:45 AM IST
UPDATE AD_Column SET IsMandatory='N',Updated=TO_TIMESTAMP('2022-10-18 11:37:45','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=215300
;
-- Oct 18, 2022, 11:37:55 AM IST
UPDATE AD_Column SET IsMandatory='N',Updated=TO_TIMESTAMP('2022-10-18 11:37:55','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=215302
;
-- Oct 18, 2022, 11:38:12 AM IST
UPDATE AD_Column SET IsMandatory='N',Updated=TO_TIMESTAMP('2022-10-18 11:38:12','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=215297
;
-- Oct 18, 2022, 11:38:28 AM IST
UPDATE AD_Field SET IsDisplayed='N', AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsDisplayedGrid='N', IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2022-10-18 11:38:28','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=207199
;
-- Oct 19, 2022, 3:54:46 PM IST
INSERT INTO t_alter_column values('sso_principleconfig','SSO_ApplicationClientID','VARCHAR(100)',null,'NULL')
;
-- Oct 19, 2022, 3:54:46 PM IST
INSERT INTO t_alter_column values('sso_principleconfig','SSO_ApplicationClientID',null,'NULL',null)
;
-- Oct 19, 2022, 3:54:58 PM IST
INSERT INTO t_alter_column values('sso_principleconfig','SSO_ApplicationLogoutURL','VARCHAR(1000)',null,'NULL')
;
-- Oct 19, 2022, 3:55:09 PM IST
INSERT INTO t_alter_column values('sso_principleconfig','SSO_ApplicationRedirectURIs','VARCHAR(1000)',null,'NULL')
;
-- Oct 19, 2022, 3:55:22 PM IST
INSERT INTO t_alter_column values('sso_principleconfig','SSO_ApplicationSecretKey','VARCHAR(100)',null,'NULL')
;
-- Oct 19, 2022, 3:55:28 PM IST
INSERT INTO t_alter_column values('sso_principleconfig','SSO_AuthorizationTenantID','VARCHAR(100)',null,'NULL')
;
-- Oct 19, 2022, 3:55:28 PM IST
INSERT INTO t_alter_column values('sso_principleconfig','SSO_AuthorizationTenantID',null,'NULL',null)
;
-- Nov 4, 2022, 4:29:25 PM IST
INSERT INTO AD_Element (AD_Element_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,ColumnName,Name,Description,PrintName,EntityType,AD_Element_UU) VALUES (203725,0,0,'Y',TO_TIMESTAMP('2022-11-04 16:29:24','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2022-11-04 16:29:24','YYYY-MM-DD HH24:MI:SS'),100,'SSO_ApplicationDomain','Application Domain','SSO Application Domain','Application Domain','D','e5ed0a02-4eaf-4713-9107-ccc79f1e0cb1')
;
-- Nov 4, 2022, 4:30:18 PM IST
INSERT INTO AD_Element (AD_Element_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,ColumnName,Name,Description,PrintName,EntityType,AD_Element_UU) VALUES (203727,0,0,'Y',TO_TIMESTAMP('2022-11-04 16:30:18','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2022-11-04 16:30:18','YYYY-MM-DD HH24:MI:SS'),100,'SSO_ApplicationDiscoveryURI','Application Discovery URI','SSO Application Discovery URI','Application Discovery URI','D','999d76d2-1744-457d-bac9-3134f750874f')
;
-- Nov 4, 2022, 4:30:45 PM IST
INSERT INTO AD_Column (AD_Column_ID,Version,Name,Description,AD_Table_ID,ColumnName,FieldLength,IsKey,IsParent,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsEncrypted,AD_Reference_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,AD_Element_ID,IsUpdateable,IsSelectionColumn,EntityType,IsSyncDatabase,IsAlwaysUpdateable,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsAllowCopy,SeqNoSelection,IsToolbarButton,IsSecure,FKConstraintType,IsHtml) VALUES (215637,0,'Application Discovery URI','SSO Application Discovery URI',200360,'SSO_ApplicationDiscoveryURI',4000,'N','N','N','N','N',0,'N',10,0,0,'Y',TO_TIMESTAMP('2022-11-04 16:30:44','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2022-11-04 16:30:44','YYYY-MM-DD HH24:MI:SS'),100,203727,'Y','N','D','N','Y','N','Y','f806a488-6dfc-4fee-aa15-9794aa9eafe0','Y',0,'N','N','N','N')
;
-- Nov 4, 2022, 4:30:46 PM IST
ALTER TABLE SSO_PrincipleConfig ADD COLUMN SSO_ApplicationDiscoveryURI VARCHAR(4000) DEFAULT NULL
;
-- Nov 4, 2022, 4:31:06 PM IST
INSERT INTO AD_Column (AD_Column_ID,Version,Name,Description,AD_Table_ID,ColumnName,FieldLength,IsKey,IsParent,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsEncrypted,AD_Reference_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,AD_Element_ID,IsUpdateable,IsSelectionColumn,EntityType,IsSyncDatabase,IsAlwaysUpdateable,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsAllowCopy,SeqNoSelection,IsToolbarButton,IsSecure,FKConstraintType,IsHtml) VALUES (215638,0,'Application Domain','SSO Application Domain',200360,'SSO_ApplicationDomain',4000,'N','N','N','N','N',0,'N',10,0,0,'Y',TO_TIMESTAMP('2022-11-04 16:31:06','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2022-11-04 16:31:06','YYYY-MM-DD HH24:MI:SS'),100,203725,'Y','N','D','N','Y','N','Y','2dbe8818-b3c5-470d-885f-7d5cb2eb0c50','Y',0,'N','N','N','N')
;
-- Nov 4, 2022, 4:31:07 PM IST
ALTER TABLE SSO_PrincipleConfig ADD COLUMN SSO_ApplicationDomain VARCHAR(4000) DEFAULT NULL
;
-- Nov 4, 2022, 4:31:25 PM IST
INSERT INTO AD_Field (AD_Field_ID,Name,Description,AD_Tab_ID,AD_Column_ID,IsDisplayed,DisplayLength,SeqNo,IsSameLine,IsHeading,IsFieldOnly,IsEncrypted,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,IsReadOnly,IsCentrallyMaintained,EntityType,AD_Field_UU,IsDisplayedGrid,SeqNoGrid,ColumnSpan) VALUES (207414,'Application Discovery URI','SSO Application Discovery URI',200328,215637,'Y',4000,120,'N','N','N','N',0,0,'Y',TO_TIMESTAMP('2022-11-04 16:31:24','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2022-11-04 16:31:24','YYYY-MM-DD HH24:MI:SS'),100,'N','Y','D','24573116-ea2f-4cc2-86d5-19abee762b99','Y',110,5)
;
-- Nov 4, 2022, 4:31:25 PM IST
INSERT INTO AD_Field (AD_Field_ID,Name,Description,AD_Tab_ID,AD_Column_ID,IsDisplayed,DisplayLength,SeqNo,IsSameLine,IsHeading,IsFieldOnly,IsEncrypted,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,IsReadOnly,IsCentrallyMaintained,EntityType,AD_Field_UU,IsDisplayedGrid,SeqNoGrid,ColumnSpan) VALUES (207415,'Application Domain','SSO Application Domain',200328,215638,'Y',4000,130,'N','N','N','N',0,0,'Y',TO_TIMESTAMP('2022-11-04 16:31:25','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2022-11-04 16:31:25','YYYY-MM-DD HH24:MI:SS'),100,'N','Y','D','3b760acd-467f-42ad-9d9c-2bc1887185b8','Y',120,5)
;
-- Nov 4, 2022, 4:31:38 PM IST
UPDATE AD_Field SET IsDisplayed='Y', SeqNo=110, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, XPosition=1, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2022-11-04 16:31:38','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=207415
;
-- Nov 4, 2022, 4:31:38 PM IST
UPDATE AD_Field SET SeqNo=0, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2022-11-04 16:31:38','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=207199
;
-- Nov 7, 2022, 4:32:56 PM IST
UPDATE AD_Column SET Help='A directory of the OIDC architecture of your user pool.',Updated=TO_TIMESTAMP('2022-11-07 16:32:56','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=215637
;
-- Nov 7, 2022, 4:37:19 PM IST
UPDATE AD_Column SET Help='A domain name is a string that identifies a realm of administrative autonomy, authority or control within the Internet for your Provider.',Updated=TO_TIMESTAMP('2022-11-07 16:37:19','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=215638
;
-- Nov 7, 2022, 4:43:08 PM IST
UPDATE AD_Column SET Help='SSO provider unique app client id',Updated=TO_TIMESTAMP('2022-11-07 16:43:08','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=215298
;
-- Nov 7, 2022, 4:45:25 PM IST
UPDATE AD_Column SET Help='SSO provider client secret key to access this user info',Updated=TO_TIMESTAMP('2022-11-07 16:45:25','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=215302
;
-- Nov 7, 2022, 4:57:57 PM IST
UPDATE AD_Column SET Help='SSO provider Tenant ID is a globally unique identifier (GUID)',Updated=TO_TIMESTAMP('2022-11-07 16:57:57','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=215297
;
-- Nov 7, 2022, 4:58:39 PM IST
UPDATE AD_Column SET Description='SSO provider Tenant ID is a globally unique identifier (GUID)',Updated=TO_TIMESTAMP('2022-11-07 16:58:39','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=215297
;
-- Nov 7, 2022, 4:59:04 PM IST
UPDATE AD_Column SET Description='SSO provider unique app client id',Updated=TO_TIMESTAMP('2022-11-07 16:59:04','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=215298
;
-- Nov 7, 2022, 4:59:12 PM IST
UPDATE AD_Column SET Description='A directory of the OIDC architecture of your user pool.',Updated=TO_TIMESTAMP('2022-11-07 16:59:12','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=215637
;
-- Nov 7, 2022, 4:59:22 PM IST
UPDATE AD_Column SET Description='A domain name is a string that identifies a realm of administrative autonomy, authority or control within the Internet for your Provider.',Updated=TO_TIMESTAMP('2022-11-07 16:59:22','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=215638
;
-- Nov 7, 2022, 4:59:29 PM IST
UPDATE AD_Column SET Description='This is where SSO provider sends a request to have the application clear the user''s session data',Updated=TO_TIMESTAMP('2022-11-07 16:59:29','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=215301
;
-- Nov 7, 2022, 4:59:36 PM IST
UPDATE AD_Column SET Description='The URIs SSO provider will accept as destinations when returning authentication responses (tokens) after successfully authenticating.',Updated=TO_TIMESTAMP('2022-11-07 16:59:36','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=215300
;
-- Nov 7, 2022, 4:59:40 PM IST
UPDATE AD_Column SET Description='SSO provider client secret key to access this user info',Updated=TO_TIMESTAMP('2022-11-07 16:59:40','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=215302
;
-- Nov 8, 2022, 3:50:10 PM IST
UPDATE AD_Field SET Description='SSO provider unique app client id', AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2022-11-08 15:50:10','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=207197
;
-- Nov 8, 2022, 3:50:29 PM IST
UPDATE AD_Field SET Description='A directory of the OIDC architecture of your user pool.', AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2022-11-08 15:50:29','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=207414
;
-- Nov 8, 2022, 3:50:41 PM IST
UPDATE AD_Field SET Description='A domain name is a string that identifies a realm of administrative autonomy, authority or control within the Internet for your Provider.', AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2022-11-08 15:50:41','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=207415
;
-- Nov 8, 2022, 3:51:17 PM IST
UPDATE AD_Field SET Description='The URIs SSO provider will accept as destinations when returning authentication responses (tokens) after successfully authenticating or signing out users.', AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2022-11-08 15:51:17','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=207198
;
-- Nov 8, 2022, 3:51:30 PM IST
UPDATE AD_Field SET Description='SSO provider client secret key to access this user info', AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2022-11-08 15:51:30','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=207201
;
-- Nov 8, 2022, 3:51:44 PM IST
UPDATE AD_Field SET Description='SSO provider Tenant ID is a globally unique identifier (GUID)', AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2022-11-08 15:51:44','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=207196
;
-- Nov 8, 2022, 4:06:57 PM IST
UPDATE AD_Column SET Help='The URIs SSO provider will accept as destinations when returning authentication responses (tokens) after successfully authenticating.',Updated=TO_TIMESTAMP('2022-11-08 16:06:57','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=215300
;
-- Nov 8, 2022, 4:07:07 PM IST
UPDATE AD_Field SET Description='The URIs SSO provider will accept as destinations when returning authentication responses (tokens) after successfully authenticating.', AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2022-11-08 16:07:07','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=207198
;
SELECT register_migration_script('202209121800_IDEMPIERE-5346.sql') FROM dual
;

View File

@ -0,0 +1,54 @@
-- IDEMPIERE-5346 SSO Support
SELECT register_migration_script('202301191424_IDEMPIERE-5346.sql') FROM dual;
-- Jan 19, 2023, 2:24:15 PM IST
INSERT INTO AD_Element (AD_Element_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,ColumnName,Name,Description,PrintName,EntityType,AD_Element_UU) VALUES (203784,0,0,'Y',TO_TIMESTAMP('2023-01-19 14:24:15','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2023-01-19 14:24:15','YYYY-MM-DD HH24:MI:SS'),100,'SSO_OSGIRedirectURIs','Felix Web Console Redirect URIs','Apache Felix Web Console Bundles Redirect URIs','Felix Web Console Redirect URIs','D','5a19b1a3-6fb1-4aea-937b-cf976ba5f4fd')
;
-- Jan 19, 2023, 2:25:23 PM IST
INSERT INTO AD_Element (AD_Element_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,ColumnName,Name,Description,PrintName,EntityType,AD_Element_UU) VALUES (203785,0,0,'Y',TO_TIMESTAMP('2023-01-19 14:25:23','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2023-01-19 14:25:23','YYYY-MM-DD HH24:MI:SS'),100,'SSO_IDempMonitorRedirectURIs','iDempiere Monitor Redirect URIs','iDempiere Monitor Redirect URIs','iDempiere Monitor Redirect URIs','D','4bb92dd4-0082-4d0e-be88-053e6f28e90c')
;
-- Jan 19, 2023, 2:25:52 PM IST
INSERT INTO AD_Column (AD_Column_ID,Version,Name,Description,AD_Table_ID,ColumnName,FieldLength,IsKey,IsParent,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsEncrypted,AD_Reference_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,AD_Element_ID,IsUpdateable,IsSelectionColumn,EntityType,IsSyncDatabase,IsAlwaysUpdateable,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsAllowCopy,SeqNoSelection,IsToolbarButton,IsSecure,FKConstraintType,IsHtml) VALUES (215764,0,'iDempiere Monitor Redirect URIs','iDempiere Monitor Redirect URIs',200360,'SSO_IDempMonitorRedirectURIs',1000,'N','N','N','N','N',0,'N',10,0,0,'Y',TO_TIMESTAMP('2023-01-19 14:25:51','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2023-01-19 14:25:51','YYYY-MM-DD HH24:MI:SS'),100,203785,'Y','N','D','N','N','N','Y','258c99b4-3d49-4b31-acf1-3ca2cd7588ee','Y',0,'N','N','N','N')
;
-- Jan 19, 2023, 2:25:54 PM IST
ALTER TABLE SSO_PrincipleConfig ADD COLUMN SSO_IDempMonitorRedirectURIs VARCHAR(1000) DEFAULT NULL
;
-- Jan 19, 2023, 2:26:17 PM IST
INSERT INTO AD_Column (AD_Column_ID,Version,Name,Description,AD_Table_ID,ColumnName,FieldLength,IsKey,IsParent,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsEncrypted,AD_Reference_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,AD_Element_ID,IsUpdateable,IsSelectionColumn,EntityType,IsSyncDatabase,IsAlwaysUpdateable,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsAllowCopy,SeqNoSelection,IsToolbarButton,IsSecure,FKConstraintType,IsHtml) VALUES (215765,0,'Felix Web Console Redirect URIs','Apache Felix Web Console Bundles Redirect URIs',200360,'SSO_OSGIRedirectURIs',1000,'N','N','N','N','N',0,'N',10,0,0,'Y',TO_TIMESTAMP('2023-01-19 14:26:16','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2023-01-19 14:26:16','YYYY-MM-DD HH24:MI:SS'),100,203784,'Y','N','D','N','N','N','Y','6e3224ea-9fe9-4129-bece-6d1863f75ca3','Y',0,'N','N','N','N')
;
-- Jan 19, 2023, 2:26:18 PM IST
ALTER TABLE SSO_PrincipleConfig ADD COLUMN SSO_OSGIRedirectURIs VARCHAR(1000) DEFAULT NULL
;
-- Jan 19, 2023, 2:26:44 PM IST
INSERT INTO AD_Field (AD_Field_ID,Name,Description,AD_Tab_ID,AD_Column_ID,IsDisplayed,DisplayLength,SeqNo,IsSameLine,IsHeading,IsFieldOnly,IsEncrypted,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,IsReadOnly,IsCentrallyMaintained,EntityType,AD_Field_UU,IsDisplayedGrid,SeqNoGrid,ColumnSpan) VALUES (207564,'iDempiere Monitor Redirect URIs','iDempiere Monitor Redirect URIs',200328,215764,'Y',1000,130,'N','N','N','N',0,0,'Y',TO_TIMESTAMP('2023-01-19 14:26:44','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2023-01-19 14:26:44','YYYY-MM-DD HH24:MI:SS'),100,'N','Y','D','f24ccf3b-b2c8-4e79-92b9-3cb645ef643a','Y',130,5)
;
-- Jan 19, 2023, 2:26:45 PM IST
INSERT INTO AD_Field (AD_Field_ID,Name,Description,AD_Tab_ID,AD_Column_ID,IsDisplayed,DisplayLength,SeqNo,IsSameLine,IsHeading,IsFieldOnly,IsEncrypted,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,IsReadOnly,IsCentrallyMaintained,EntityType,AD_Field_UU,IsDisplayedGrid,SeqNoGrid,ColumnSpan) VALUES (207565,'Felix Web Console Redirect URIs','Apache Felix Web Console Bundles Redirect URIs',200328,215765,'Y',1000,140,'N','N','N','N',0,0,'Y',TO_TIMESTAMP('2023-01-19 14:26:44','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2023-01-19 14:26:44','YYYY-MM-DD HH24:MI:SS'),100,'N','Y','D','21fba3e0-7bd6-4415-a17c-e95021e0caef','Y',140,5)
;
-- Jan 19, 2023, 2:27:10 PM IST
UPDATE AD_Field SET IsDisplayed='Y', SeqNo=110, XPosition=1,Updated=TO_TIMESTAMP('2023-01-19 14:27:10','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=207564
;
-- Jan 19, 2023, 2:27:10 PM IST
UPDATE AD_Field SET IsDisplayed='Y', SeqNo=120, XPosition=1,Updated=TO_TIMESTAMP('2023-01-19 14:27:10','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=207565
;
-- Jan 19, 2023, 2:27:10 PM IST
UPDATE AD_Field SET SeqNo=130,Updated=TO_TIMESTAMP('2023-01-19 14:27:10','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=207415
;
-- Jan 19, 2023, 2:27:10 PM IST
UPDATE AD_Field SET SeqNo=140,Updated=TO_TIMESTAMP('2023-01-19 14:27:10','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=207414
;
-- Jan 23, 2023, 6:52:57 PM IST
INSERT INTO AD_SysConfig (AD_SysConfig_ID,AD_Client_ID,AD_Org_ID,Created,Updated,CreatedBy,UpdatedBy,IsActive,Name,Value,Description,EntityType,ConfigurationLevel,AD_SysConfig_UU) VALUES (200216,0,0,TO_TIMESTAMP('2023-01-23 18:52:56','YYYY-MM-DD HH24:MI:SS'),TO_TIMESTAMP('2023-01-23 18:52:56','YYYY-MM-DD HH24:MI:SS'),100,100,'Y','SSO_SELECT_ROLE','Y','Show Role Panel When Login With SSO','D','S','0e1cc248-9f7b-4572-96fd-0270c6a9934b')
;

View File

@ -0,0 +1,23 @@
-- IDEMPIERE-5346 SSO Support
SELECT register_migration_script('202302081442_IDEMPIERE-5346.sql') FROM dual;
-- Feb 8, 2023, 2:42:41 PM CET
UPDATE AD_Table SET AD_Window_ID=200132,Updated=TO_TIMESTAMP('2023-02-08 14:42:41','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Table_ID=200360
;
-- Dec 13, 2022, 3:13:42 PM CET
UPDATE AD_TreeNodeMM SET Parent_ID=200178, SeqNo=0,Updated=TO_TIMESTAMP('2022-12-13 15:13:42','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Tree_ID=10 AND Node_ID=200179
;
-- Dec 13, 2022, 3:13:42 PM CET
UPDATE AD_TreeNodeMM SET Parent_ID=200178, SeqNo=1,Updated=TO_TIMESTAMP('2022-12-13 15:13:42','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Tree_ID=10 AND Node_ID=200180
;
-- Dec 13, 2022, 3:13:42 PM CET
UPDATE AD_TreeNodeMM SET Parent_ID=200178, SeqNo=2,Updated=TO_TIMESTAMP('2022-12-13 15:13:42','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Tree_ID=10 AND Node_ID=200182
;
-- Dec 13, 2022, 3:13:42 PM CET
UPDATE AD_TreeNodeMM SET Parent_ID=200178, SeqNo=3,Updated=TO_TIMESTAMP('2022-12-13 15:13:42','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Tree_ID=10 AND Node_ID=200213
;

View File

@ -0,0 +1,55 @@
-- IDEMPIERE-5346 SSO Support
SELECT register_migration_script('202303281510_IDEMPIERE-5346.sql') FROM dual;
-- Mar 28, 2023, 3:10:00 PM IST
INSERT INTO AD_Element (AD_Element_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,ColumnName,Name,PrintName,EntityType,AD_Element_UU) VALUES (203798,0,0,'Y',TO_TIMESTAMP('2023-03-28 15:09:59','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2023-03-28 15:09:59','YYYY-MM-DD HH24:MI:SS'),100,'AuthenticationType','Authentication Type','Authentication Type','D','b1c28755-ae35-4567-8912-c1a91e98bca4')
;
-- Mar 28, 2023, 3:10:31 PM IST
INSERT INTO AD_Column (AD_Column_ID,Version,Name,AD_Table_ID,ColumnName,FieldLength,IsKey,IsParent,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsEncrypted,AD_Reference_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,AD_Element_ID,IsUpdateable,IsSelectionColumn,EntityType,IsSyncDatabase,IsAlwaysUpdateable,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsAllowCopy,SeqNoSelection,IsToolbarButton,IsSecure,FKConstraintType,IsHtml) VALUES (215808,0,'Authentication Type',114,'AuthenticationType',10,'N','N','N','N','N',0,'N',17,0,0,'Y',TO_TIMESTAMP('2023-03-28 15:10:30','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2023-03-28 15:10:30','YYYY-MM-DD HH24:MI:SS'),100,203798,'Y','N','D','N','N','N','Y','b887af64-55cf-48f0-91e2-48b57c228c81','Y',0,'N','N','N','N')
;
-- Mar 28, 2023, 3:11:05 PM IST
INSERT INTO AD_Reference (AD_Reference_ID,Name,ValidationType,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,EntityType,IsOrderByValue,AD_Reference_UU) VALUES (200239,'Authentication Type List','L',0,0,'Y',TO_TIMESTAMP('2023-03-28 15:11:04','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2023-03-28 15:11:04','YYYY-MM-DD HH24:MI:SS'),100,'D','N','8bf2b11e-71f7-4b40-b4fb-4b6dfd7d767e')
;
-- Mar 28, 2023, 3:13:37 PM IST
INSERT INTO AD_Ref_List (AD_Ref_List_ID,Name,AD_Reference_ID,Value,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,EntityType,AD_Ref_List_UU) VALUES (200632,'SSO Only',200239,'SSO',0,0,'Y',TO_TIMESTAMP('2023-03-28 15:13:36','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2023-03-28 15:13:36','YYYY-MM-DD HH24:MI:SS'),100,'D','d726bc83-5d69-4082-b224-e0803b5c234d')
;
-- Mar 28, 2023, 3:14:19 PM IST
INSERT INTO AD_Ref_List (AD_Ref_List_ID,Name,AD_Reference_ID,Value,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,EntityType,AD_Ref_List_UU) VALUES (200633,'Application Only',200239,'APO',0,0,'Y',TO_TIMESTAMP('2023-03-28 15:14:18','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2023-03-28 15:14:18','YYYY-MM-DD HH24:MI:SS'),100,'D','32f2269c-8c71-40f1-a128-d6f805030a69')
;
-- Mar 28, 2023, 3:16:08 PM IST
INSERT INTO AD_Ref_List (AD_Ref_List_ID,Name,AD_Reference_ID,Value,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,EntityType,AD_Ref_List_UU) VALUES (200634,'Application and SSO',200239,'AAS',0,0,'Y',TO_TIMESTAMP('2023-03-28 15:16:08','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2023-03-28 15:16:08','YYYY-MM-DD HH24:MI:SS'),100,'D','7cd3af94-1e49-4d9f-9e33-dbdc0dfce7bb')
;
-- Mar 28, 2023, 3:16:21 PM IST
UPDATE AD_Column SET AD_Reference_Value_ID=200239,Updated=TO_TIMESTAMP('2023-03-28 15:16:21','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=215808
;
-- Mar 28, 2023, 3:16:23 PM IST
ALTER TABLE AD_User ADD COLUMN AuthenticationType VARCHAR(10) DEFAULT NULL
;
-- Mar 28, 2023, 3:41:55 PM IST
INSERT INTO AD_Field (AD_Field_ID,Name,AD_Tab_ID,AD_Column_ID,IsDisplayed,DisplayLength,SeqNo,IsSameLine,IsHeading,IsFieldOnly,IsEncrypted,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,IsReadOnly,IsCentrallyMaintained,EntityType,AD_Field_UU,IsDisplayedGrid,SeqNoGrid,ColumnSpan) VALUES (207598,'Authentication Type',118,215808,'Y',10,460,'N','N','N','N',0,0,'Y',TO_TIMESTAMP('2023-03-28 15:41:55','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2023-03-28 15:41:55','YYYY-MM-DD HH24:MI:SS'),100,'N','Y','D','65779dd6-818c-40f4-9f73-eda819697164','Y',440,2)
;
-- May 22, 2023, 1:50:43 PM IST
INSERT INTO AD_Column (AD_Column_ID,Version,Name,AD_Table_ID,ColumnName,FieldLength,IsKey,IsParent,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsEncrypted,AD_Reference_ID,AD_Reference_Value_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,AD_Element_ID,IsUpdateable,IsSelectionColumn,EntityType,IsSyncDatabase,IsAlwaysUpdateable,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsAllowCopy,SeqNoSelection,IsToolbarButton,IsSecure,FKConstraintType,IsHtml) VALUES (215840,0,'Authentication Type',112,'AuthenticationType',10,'N','N','N','N','N',0,'N',17,200239,0,0,'Y',TO_TIMESTAMP('2023-05-22 13:50:42','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2023-05-22 13:50:42','YYYY-MM-DD HH24:MI:SS'),100,203798,'Y','N','D','N','N','N','Y','33738ece-b095-44eb-a032-5564d47a04ca','Y',0,'N','N','N','N')
;
-- May 22, 2023, 1:53:39 PM IST
ALTER TABLE AD_Client ADD COLUMN AuthenticationType VARCHAR(10) DEFAULT NULL
;
-- May 22, 2023, 2:49:13 PM IST
INSERT INTO AD_Field (AD_Field_ID,Name,AD_Tab_ID,AD_Column_ID,IsDisplayed,DisplayLength,SeqNo,SortNo,IsSameLine,IsHeading,IsFieldOnly,IsEncrypted,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,IsReadOnly,IsCentrallyMaintained,EntityType,AD_Field_UU,IsDisplayedGrid,SeqNoGrid,XPosition,ColumnSpan,NumLines,IsQuickEntry,IsDefaultFocus,IsAdvancedField,IsQuickForm) VALUES (207626,'Authentication Type',145,215840,'Y',0,240,0,'N','N','N','N',0,0,'Y',TO_TIMESTAMP('2023-05-22 14:49:12','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2023-05-22 14:49:12','YYYY-MM-DD HH24:MI:SS'),100,'N','Y','D','1fbf8620-b944-4be9-b60f-f9bf4fcff4c8','Y',280,2,2,1,'N','N','N','N')
;
-- May 22, 2023, 2:49:38 PM IST
UPDATE AD_Field SET SeqNo=240, XPosition=1,Updated=TO_TIMESTAMP('2023-05-22 14:49:38','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=207626
;

View File

@ -0,0 +1,64 @@
-- IDEMPIERE-5346 SSO Support
SELECT register_migration_script('202307111656_IDEMPIERE-5346.sql') FROM dual;
-- Jul 11, 2023, 4:56:08 PM IST
UPDATE AD_Table SET TableName='SSO_PrincipalConfig',Updated=TO_TIMESTAMP('2023-07-11 16:56:08','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Table_ID=200360
;
-- Jul 11, 2023, 4:56:09 PM IST
INSERT INTO AD_Sequence (Name,CurrentNext,IsAudited,StartNewYear,Description,IsActive,IsTableID,AD_Client_ID,AD_Org_ID,Created,CreatedBy,Updated,UpdatedBy,AD_Sequence_ID,IsAutoSequence,StartNo,IncrementNo,CurrentNextSys,AD_Sequence_UU) VALUES ('SSO_PrincipalConfig',1000000,'N','N','Table SSO_PrincipalConfig','Y','Y',0,0,TO_TIMESTAMP('2023-07-11 16:56:08','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2023-07-11 16:56:08','YYYY-MM-DD HH24:MI:SS'),100,200458,'Y',1000000,1,200000,'0a3c92f4-feb8-40aa-9c08-2c91a2fc1aad')
;
-- Jul 12, 2023, 10:12:14 AM IST
UPDATE AD_Element SET ColumnName='SSO_PrincipalConfig_ID',Updated=TO_TIMESTAMP('2023-07-12 10:12:14','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Element_ID=203653
;
-- Jul 12, 2023, 10:12:14 AM IST
UPDATE AD_Column SET ColumnName='SSO_PrincipalConfig_ID', Name='SSO Configuration', Description=NULL, Help=NULL, Placeholder=NULL WHERE AD_Element_ID=203653
;
-- Jul 12, 2023, 10:12:14 AM IST
UPDATE AD_Process_Para SET ColumnName='SSO_PrincipalConfig_ID', Name='SSO Configuration', Description=NULL, Help=NULL, AD_Element_ID=203653 WHERE UPPER(ColumnName)='SSO_PRINCIPALCONFIG_ID' AND IsCentrallyMaintained='Y' AND AD_Element_ID IS NULL
;
-- Jul 12, 2023, 10:12:14 AM IST
UPDATE AD_Process_Para SET ColumnName='SSO_PrincipalConfig_ID', Name='SSO Configuration', Description=NULL, Help=NULL, Placeholder=NULL WHERE AD_Element_ID=203653 AND IsCentrallyMaintained='Y'
;
-- Jul 12, 2023, 10:12:14 AM IST
UPDATE AD_InfoColumn SET ColumnName='SSO_PrincipalConfig_ID', Name='SSO Configuration', Description=NULL, Help=NULL, Placeholder=NULL WHERE AD_Element_ID=203653 AND IsCentrallyMaintained='Y'
;
-- Jul 12, 2023, 10:12:33 AM IST
UPDATE AD_Element SET ColumnName='SSO_PrincipalConfig_UU',Updated=TO_TIMESTAMP('2023-07-12 10:12:33','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Element_ID=203654
;
-- Jul 12, 2023, 10:12:33 AM IST
UPDATE AD_Column SET ColumnName='SSO_PrincipalConfig_UU', Name='SSO Configuration UU', Description=NULL, Help=NULL, Placeholder=NULL WHERE AD_Element_ID=203654
;
-- Jul 12, 2023, 10:12:33 AM IST
UPDATE AD_Process_Para SET ColumnName='SSO_PrincipalConfig_UU', Name='SSO Configuration UU', Description=NULL, Help=NULL, AD_Element_ID=203654 WHERE UPPER(ColumnName)='SSO_PRINCIPALCONFIG_UU' AND IsCentrallyMaintained='Y' AND AD_Element_ID IS NULL
;
-- Jul 12, 2023, 10:12:33 AM IST
UPDATE AD_Process_Para SET ColumnName='SSO_PrincipalConfig_UU', Name='SSO Configuration UU', Description=NULL, Help=NULL, Placeholder=NULL WHERE AD_Element_ID=203654 AND IsCentrallyMaintained='Y'
;
-- Jul 12, 2023, 10:12:33 AM IST
UPDATE AD_InfoColumn SET ColumnName='SSO_PrincipalConfig_UU', Name='SSO Configuration UU', Description=NULL, Help=NULL, Placeholder=NULL WHERE AD_Element_ID=203654 AND IsCentrallyMaintained='Y'
;
ALTER TABLE SSO_PrincipleConfig RENAME TO SSO_PrincipalConfig;
ALTER TABLE SSO_PrincipalConfig RENAME COLUMN SSO_PrincipleConfig_ID TO SSO_PrincipalConfig_ID;
ALTER TABLE SSO_PrincipalConfig RENAME COLUMN SSO_PrincipleConfig_UU TO SSO_PrincipalConfig_UU;
ALTER TABLE sso_principalconfig RENAME CONSTRAINT sso_principleconfig_key TO sso_principalconfig_key;
ALTER TABLE sso_principalconfig RENAME CONSTRAINT sso_principleconfig_uu_idx TO sso_principalconfig_uu_idx;
ALTER TABLE sso_principalconfig RENAME CONSTRAINT sso_principleconfig_isactive_check TO sso_principalconfig_isactive_check;
ALTER TABLE sso_principalconfig RENAME CONSTRAINT sso_principleconfig_isdefault_check TO sso_principalconfig_isdefault_check;

View File

@ -0,0 +1,12 @@
-- IDEMPIERE-5346 SSO Support
SELECT register_migration_script('202307271640_IDEMPIERE-5346.sql') FROM dual;
-- Jul 27, 2023, 4:40:22 PM IST
DELETE FROM AD_Field WHERE AD_Field_UU='3b760acd-467f-42ad-9d9c-2bc1887185b8'
;
-- Jul 27, 2023, 4:40:36 PM IST
DELETE FROM AD_Column WHERE AD_Column_UU='2dbe8818-b3c5-470d-885f-7d5cb2eb0c50'
;
ALTER TABLE SSO_PrincipalConfig DROP COLUMN SSO_ApplicationDomain;

View File

@ -0,0 +1,26 @@
-- IDEMPIERE-5346 SSO Support
SELECT register_migration_script('202308071538_IDEMPIERE-5346.sql') FROM dual;
-- Aug 7, 2023, 3:38:25 PM IST
UPDATE AD_Column SET DefaultValue='AAS',IsMandatory='Y',Updated=TO_TIMESTAMP('2023-08-07 15:38:25','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=215840
;
-- Aug 7, 2023, 3:54:21 PM IST
INSERT INTO t_alter_column values('ad_client','AuthenticationType','VARCHAR(10)',null,'AAS')
;
-- Aug 7, 2023, 3:54:21 PM IST
UPDATE AD_Client SET AuthenticationType='AAS' WHERE AuthenticationType IS NULL
;
-- Aug 7, 2023, 3:54:21 PM IST
INSERT INTO t_alter_column values('ad_client','AuthenticationType',null,'NOT NULL',null)
;
-- Aug 17, 2023, 8:34:57 PM IST
INSERT INTO AD_SysConfig (AD_SysConfig_ID,AD_Client_ID,AD_Org_ID,Created,Updated,CreatedBy,UpdatedBy,IsActive,Name,Value,Description,EntityType,ConfigurationLevel,AD_SysConfig_UU) VALUES (200231,0,0,TO_TIMESTAMP('2023-08-17 20:34:56','YYYY-MM-DD HH24:MI:SS'),TO_TIMESTAMP('2023-08-17 20:34:56','YYYY-MM-DD HH24:MI:SS'),100,100,'Y','ENABLE_SSO_IDEMPIERE_MONITOR','N','Enable SSO Authentication Login for iDempiere Monitor','D','S','b9ab5ead-5743-4b62-aaab-6c3ae9d969ac')
;
-- Aug 17, 2023, 8:35:22 PM IST
INSERT INTO AD_SysConfig (AD_SysConfig_ID,AD_Client_ID,AD_Org_ID,Created,Updated,CreatedBy,UpdatedBy,IsActive,Name,Value,Description,EntityType,ConfigurationLevel,AD_SysConfig_UU) VALUES (200232,0,0,TO_TIMESTAMP('2023-08-17 20:35:21','YYYY-MM-DD HH24:MI:SS'),TO_TIMESTAMP('2023-08-17 20:35:21','YYYY-MM-DD HH24:MI:SS'),100,100,'Y','ENABLE_SSO_OSGI_CONSOLE','N','Enable SSO Authentication Login for Felix Web Console','D','S','063c3226-5c7f-40af-ba8d-d594a4ca469c')
;

View File

@ -32,6 +32,7 @@ Export-Package: bsh,
org.adempiere.base.event.annotations.imp,
org.adempiere.base.event.annotations.po,
org.adempiere.base.event.annotations.process,
org.adempiere.base.sso,
org.adempiere.base.upload,
org.adempiere.exceptions,
org.adempiere.impexp,

View File

@ -0,0 +1,31 @@
/******************************************************************************
* Copyright (C) 2016 Logilite Technologies LLP *
* This program is free software; you can redistribute it and/or modify it *
* under the terms version 2 of the GNU General Public License as published *
* by the Free Software Foundation. This program is distributed in the hope *
* that it will be useful, but WITHOUT ANY WARRANTY; without even the implied *
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
* See the GNU General Public License for more details. *
* You should have received a copy of the GNU General Public License along *
* with this program; if not, write to the Free Software Foundation, Inc., *
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
*****************************************************************************/
package org.adempiere.base.sso;
import org.compiere.model.I_SSO_PrincipalConfig;
/**
* @author Logilite Technologies
*
*/
public interface ISSOPrincipalFactory
{
/**
* Get SSO Principal Service for login authentication
*
* @param config
* @return
*/
public ISSOPrincipalService getSSOPrincipalService(I_SSO_PrincipalConfig config);
}

View File

@ -0,0 +1,98 @@
/******************************************************************************
* Copyright (C) 2016 Logilite Technologies LLP *
* This program is free software; you can redistribute it and/or modify it *
* under the terms version 2 of the GNU General Public License as published *
* by the Free Software Foundation. This program is distributed in the hope *
* that it will be useful, but WITHOUT ANY WARRANTY; without even the implied *
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
* See the GNU General Public License for more details. *
* You should have received a copy of the GNU General Public License along *
* with this program; if not, write to the Free Software Foundation, Inc., *
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
*****************************************************************************/
package org.adempiere.base.sso;
import java.io.IOException;
import java.text.ParseException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.compiere.util.Language;
/**
* @author Logilite Technologies
*/
public interface ISSOPrincipalService
{
public static final String SSO_PRINCIPAL_SESSION_TOKEN = "sso.principal.token";
public static final String SSO_ZOOM_PARAM = "sso.zoom.param";
public static final String SSO_ADMIN_LOGIN = "sso.admin.login";
/**
* Check the request has an authentication code
*
* @param request HttpServletRequest
* @param response HttpServletResponse
* @return
*/
public boolean hasAuthenticationCode(HttpServletRequest request, HttpServletResponse response);
/**
* Get the token by authentication code and save in the session attribute
* SSO_PRINCIPAL_SESSION_TOKEN
*
* @param request HttpServletRequest
* @param response HttpServletResponse
* @param redirectMode {@value SSOUtils.SSO_MODE_WEBUI}, {@value SSOUtils.SSO_MODE_OSGI},
* {@value SSOUtils.SSO_MODE_MONITOR}
* @throws Throwable
*/
public void getAuthenticationToken(HttpServletRequest request, HttpServletResponse response, String redirectMode) throws Throwable;
/**
* Check the request session attribute SSO_PRINCIPAL_SESSION_TOKEN has token
*
* @param request HttpServletRequest
* @param response HttpServletResponse
* @return
*/
public boolean isAuthenticated(HttpServletRequest request, HttpServletResponse response);
/**
* Redirect to SSO authentication/login page
*
* @param request HttpServletRequest
* @param response HttpServletResponse
* @param redirectMode {@value SSOUtils.SSO_MODE_WEBUI}, {@value SSOUtils.SSO_MODE_OSGI},
* {@value SSOUtils.SSO_MODE_MONITOR}
* @throws IOException
*/
public void redirectForAuthentication(HttpServletRequest request, HttpServletResponse response, String redirectMode) throws IOException;
/**
* Remove all SSO-related attributes from the session.
*
* @param request HttpServletRequest
*/
public void removePrincipalFromSession(HttpServletRequest request);
/**
* Return user name/ email from a token.
*
* @param token authentication token
* @return User Name/email
* @throws ParseException
*/
public String getUserName(Object token) throws ParseException;
/**
* Return login Language from a token
*
* @param token authentication token
* @return Login Language
* @throws ParseException
*/
public Language getLanguage(Object token) throws ParseException;
}

View File

@ -0,0 +1,134 @@
/******************************************************************************
* Copyright (C) 2016 Logilite Technologies LLP *
* This program is free software; you can redistribute it and/or modify it *
* under the terms version 2 of the GNU General Public License as published *
* by the Free Software Foundation. This program is distributed in the hope *
* that it will be useful, but WITHOUT ANY WARRANTY; without even the implied *
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
* See the GNU General Public License for more details. *
* You should have received a copy of the GNU General Public License along *
* with this program; if not, write to the Free Software Foundation, Inc., *
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
*****************************************************************************/
package org.adempiere.base.sso;
import java.util.ArrayList;
import java.util.List;
import javax.servlet.http.HttpServletRequest;
import org.adempiere.base.Service;
import org.compiere.model.I_SSO_PrincipalConfig;
import org.compiere.model.MSSOPrincipalConfig;
import org.compiere.util.CCache;
/**
* @author Logilite Technologies
*/
public class SSOUtils
{
private static final CCache<Integer, ISSOPrincipalService> s_SSOPrincipalServicecache = new CCache<Integer, ISSOPrincipalService>(SSOUtils.class.getSimpleName(), 40, 0);
public static final String ERROR_VALIDATION_URL = "/error.zul";
public static final String SSO_MODE_OSGI = "SSO_MODE_OSGI";
public static final String SSO_MODE_WEBUI = "SSO_MODE_WEBUI";
public static final String SSO_MODE_MONITOR = "SSO_MODE_MONITOR";
public static final String ISCHANGEROLE_REQUEST = "ISCHANGEROLE_REQUEST";
public static final String EVENT_ON_AFTER_SSOLOGIN = "onAfterSSOLogin";
// List of url patterns ignored for validating token
private static ArrayList<String> ignoreResourceURL = null;
static
{
ignoreResourceURL = new ArrayList<String>();
ignoreResourceURL.add("zkau");
ignoreResourceURL.add("images");
ignoreResourceURL.add("css");
ignoreResourceURL.add("res");
}
public static ISSOPrincipalService getSSOPrincipalService()
{
ISSOPrincipalService principal = null;
MSSOPrincipalConfig config = MSSOPrincipalConfig.getDefaultSSOPrincipalConfig();
if (config == null)
return null;
if (s_SSOPrincipalServicecache.containsKey(config.getSSO_PrincipalConfig_ID()))
return s_SSOPrincipalServicecache.get(config.getSSO_PrincipalConfig_ID());
List<ISSOPrincipalFactory> factories = Service.locator().list(ISSOPrincipalFactory.class).getServices();
for (ISSOPrincipalFactory factory : factories)
{
principal = factory.getSSOPrincipalService(config);
if (principal != null)
{
s_SSOPrincipalServicecache.put(config.getSSO_PrincipalConfig_ID(), principal);
break;
}
}
return principal;
}
/**
* The target redirect URL for identity provider after authentication
* @param redirectMode
* @param config
* @return
*/
public static String getRedirectedURL(String redirectMode, I_SSO_PrincipalConfig config)
{
if (SSO_MODE_OSGI.equalsIgnoreCase(redirectMode))
return config.getSSO_OSGIRedirectURIs();
else if (SSO_MODE_MONITOR.equalsIgnoreCase(redirectMode))
return config.getSSO_IDempMonitorRedirectURIs();
return config.getSSO_ApplicationRedirectURIs();
}
/**
* Create Error page for error message
* @param error
* @return
*/
public static String getCreateErrorResponce(String error)
{
return new StringBuffer("<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Transitional//EN' 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd'>")
.append("<html xmlns='http://www.w3.org/1999/xhtml'>")
.append("<head>")
.append("<meta http-equiv='Content-Type' content='text/html; charset=utf-8' />")
.append("<title>iDempiere Server Error</title>")
.append("<link href='/standard.css' rel='stylesheet'/>")
.append("</head>")
.append("<body>")
.append("<h1>iDempiere Server Error </h1>")
.append("<p>The iDempiere Server encountered a unrecoverable error.</p>")
.append("<p>")
.append(error)
.append("</p>")
.append("<h2>Please notify the administrator.</h2>")
.append("</body>")
.append("</html>")
.toString();
}
/**
* if Resource request then it do not redirected to identity provider for authentication
* @param request
* @param isWebUI
* @return
*/
public static boolean isResourceRequest(HttpServletRequest request, boolean isWebUI)
{
String[] urlpath = request.getServletPath().toLowerCase().split("/");
if (isWebUI)
return urlpath != null && urlpath.length > 1 && ignoreResourceURL.contains(urlpath[1]);
else
return urlpath != null && urlpath.length > 3 && ignoreResourceURL.contains(urlpath[3]);
}
}

View File

@ -110,6 +110,15 @@ public interface I_AD_Client
public org.compiere.model.I_AD_ReplicationStrategy getAD_ReplicationStrategy() throws RuntimeException;
/** Column name AuthenticationType */
public static final String COLUMNNAME_AuthenticationType = "AuthenticationType";
/** Set Authentication Type */
public void setAuthenticationType (String AuthenticationType);
/** Get Authentication Type */
public String getAuthenticationType();
/** Column name AutoArchive */
public static final String COLUMNNAME_AutoArchive = "AutoArchive";

View File

@ -119,6 +119,15 @@ public interface I_AD_User
/** Get Answer */
public String getAnswer();
/** Column name AuthenticationType */
public static final String COLUMNNAME_AuthenticationType = "AuthenticationType";
/** Set Authentication Type */
public void setAuthenticationType (String AuthenticationType);
/** Get Authentication Type */
public String getAuthenticationType();
/** Column name Birthday */
public static final String COLUMNNAME_Birthday = "Birthday";

View File

@ -0,0 +1,270 @@
/******************************************************************************
* Product: iDempiere ERP & CRM Smart Business Solution *
* Copyright (C) 1999-2012 ComPiere, Inc. All Rights Reserved. *
* This program is free software, you can redistribute it and/or modify it *
* under the terms version 2 of the GNU General Public License as published *
* by the Free Software Foundation. This program is distributed in the hope *
* that it will be useful, but WITHOUT ANY WARRANTY, without even the implied *
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
* See the GNU General Public License for more details. *
* You should have received a copy of the GNU General Public License along *
* with this program, if not, write to the Free Software Foundation, Inc., *
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
* For the text or an alternative of this public license, you may reach us *
* ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA *
* or via info@compiere.org or http://www.compiere.org/license.html *
*****************************************************************************/
package org.compiere.model;
import java.math.BigDecimal;
import java.sql.Timestamp;
import org.compiere.util.KeyNamePair;
/** Generated Interface for SSO_PrincipalConfig
* @author iDempiere (generated)
* @version Release 11
*/
public interface I_SSO_PrincipalConfig
{
/** TableName=SSO_PrincipalConfig */
public static final String Table_Name = "SSO_PrincipalConfig";
/** AD_Table_ID=200360 */
public static final int Table_ID = 200360;
KeyNamePair Model = new KeyNamePair(Table_ID, Table_Name);
/** AccessLevel = 4 - System
*/
BigDecimal accessLevel = BigDecimal.valueOf(4);
/** Load Meta Data */
/** Column name AD_Client_ID */
public static final String COLUMNNAME_AD_Client_ID = "AD_Client_ID";
/** Get Tenant.
* Tenant for this installation.
*/
public int getAD_Client_ID();
/** Column name AD_Org_ID */
public static final String COLUMNNAME_AD_Org_ID = "AD_Org_ID";
/** Set Organization.
* Organizational entity within tenant
*/
public void setAD_Org_ID (int AD_Org_ID);
/** Get Organization.
* Organizational entity within tenant
*/
public int getAD_Org_ID();
/** Column name Created */
public static final String COLUMNNAME_Created = "Created";
/** Get Created.
* Date this record was created
*/
public Timestamp getCreated();
/** Column name CreatedBy */
public static final String COLUMNNAME_CreatedBy = "CreatedBy";
/** Get Created By.
* User who created this records
*/
public int getCreatedBy();
/** Column name IsActive */
public static final String COLUMNNAME_IsActive = "IsActive";
/** Set Active.
* The record is active in the system
*/
public void setIsActive (boolean IsActive);
/** Get Active.
* The record is active in the system
*/
public boolean isActive();
/** Column name IsDefault */
public static final String COLUMNNAME_IsDefault = "IsDefault";
/** Set Default.
* Default value
*/
public void setIsDefault (boolean IsDefault);
/** Get Default.
* Default value
*/
public boolean isDefault();
/** Column name Name */
public static final String COLUMNNAME_Name = "Name";
/** Set Name.
* Alphanumeric identifier of the entity
*/
public void setName (String Name);
/** Get Name.
* Alphanumeric identifier of the entity
*/
public String getName();
/** Column name SSO_ApplicationClientID */
public static final String COLUMNNAME_SSO_ApplicationClientID = "SSO_ApplicationClientID";
/** Set Application Client ID.
* SSO Application Client ID
*/
public void setSSO_ApplicationClientID (String SSO_ApplicationClientID);
/** Get Application Client ID.
* SSO Application Client ID
*/
public String getSSO_ApplicationClientID();
/** Column name SSO_ApplicationDiscoveryURI */
public static final String COLUMNNAME_SSO_ApplicationDiscoveryURI = "SSO_ApplicationDiscoveryURI";
/** Set Application Discovery URI.
* SSO Application Discovery URI
*/
public void setSSO_ApplicationDiscoveryURI (String SSO_ApplicationDiscoveryURI);
/** Get Application Discovery URI.
* SSO Application Discovery URI
*/
public String getSSO_ApplicationDiscoveryURI();
/** Column name SSO_ApplicationLogoutURL */
public static final String COLUMNNAME_SSO_ApplicationLogoutURL = "SSO_ApplicationLogoutURL";
/** Set Application Logout URL.
* SSO Application Logout URL
*/
public void setSSO_ApplicationLogoutURL (String SSO_ApplicationLogoutURL);
/** Get Application Logout URL.
* SSO Application Logout URL
*/
public String getSSO_ApplicationLogoutURL();
/** Column name SSO_ApplicationRedirectURIs */
public static final String COLUMNNAME_SSO_ApplicationRedirectURIs = "SSO_ApplicationRedirectURIs";
/** Set Application Redirect URIs.
* SSO Application Redirect URIs
*/
public void setSSO_ApplicationRedirectURIs (String SSO_ApplicationRedirectURIs);
/** Get Application Redirect URIs.
* SSO Application Redirect URIs
*/
public String getSSO_ApplicationRedirectURIs();
/** Column name SSO_ApplicationSecretKey */
public static final String COLUMNNAME_SSO_ApplicationSecretKey = "SSO_ApplicationSecretKey";
/** Set Application Secret Key.
* SSO Application Secret Key
*/
public void setSSO_ApplicationSecretKey (String SSO_ApplicationSecretKey);
/** Get Application Secret Key.
* SSO Application Secret Key
*/
public String getSSO_ApplicationSecretKey();
/** Column name SSO_AuthorizationTenantID */
public static final String COLUMNNAME_SSO_AuthorizationTenantID = "SSO_AuthorizationTenantID";
/** Set Tenant ID.
* SSO Tenant ID
*/
public void setSSO_AuthorizationTenantID (String SSO_AuthorizationTenantID);
/** Get Tenant ID.
* SSO Tenant ID
*/
public String getSSO_AuthorizationTenantID();
/** Column name SSO_IDempMonitorRedirectURIs */
public static final String COLUMNNAME_SSO_IDempMonitorRedirectURIs = "SSO_IDempMonitorRedirectURIs";
/** Set iDempiere Monitor Redirect URIs.
* iDempiere Monitor Redirect URIs
*/
public void setSSO_IDempMonitorRedirectURIs (String SSO_IDempMonitorRedirectURIs);
/** Get iDempiere Monitor Redirect URIs.
* iDempiere Monitor Redirect URIs
*/
public String getSSO_IDempMonitorRedirectURIs();
/** Column name SSO_OSGIRedirectURIs */
public static final String COLUMNNAME_SSO_OSGIRedirectURIs = "SSO_OSGIRedirectURIs";
/** Set Felix Web Console Redirect URIs.
* Apache Felix Web Console Bundles Redirect URIs
*/
public void setSSO_OSGIRedirectURIs (String SSO_OSGIRedirectURIs);
/** Get Felix Web Console Redirect URIs.
* Apache Felix Web Console Bundles Redirect URIs
*/
public String getSSO_OSGIRedirectURIs();
/** Column name SSO_PrincipalConfig_ID */
public static final String COLUMNNAME_SSO_PrincipalConfig_ID = "SSO_PrincipalConfig_ID";
/** Set SSO Configuration */
public void setSSO_PrincipalConfig_ID (int SSO_PrincipalConfig_ID);
/** Get SSO Configuration */
public int getSSO_PrincipalConfig_ID();
/** Column name SSO_PrincipalConfig_UU */
public static final String COLUMNNAME_SSO_PrincipalConfig_UU = "SSO_PrincipalConfig_UU";
/** Set SSO Configuration UU */
public void setSSO_PrincipalConfig_UU (String SSO_PrincipalConfig_UU);
/** Get SSO Configuration UU */
public String getSSO_PrincipalConfig_UU();
/** Column name SSO_Provider */
public static final String COLUMNNAME_SSO_Provider = "SSO_Provider";
/** Set SSO Provider.
* Single Sign-On (SSO) Providers ( Microsoft Azure , Google, Jump Cloud etc..)
*/
public void setSSO_Provider (String SSO_Provider);
/** Get SSO Provider.
* Single Sign-On (SSO) Providers ( Microsoft Azure , Google, Jump Cloud etc..)
*/
public String getSSO_Provider();
/** Column name Updated */
public static final String COLUMNNAME_Updated = "Updated";
/** Get Updated.
* Date this record was updated
*/
public Timestamp getUpdated();
/** Column name UpdatedBy */
public static final String COLUMNNAME_UpdatedBy = "UpdatedBy";
/** Get Updated By.
* User who updated this records
*/
public int getUpdatedBy();
}

View File

@ -0,0 +1,67 @@
/******************************************************************************
* Copyright (C) 2016 Logilite Technologies LLP *
* This program is free software; you can redistribute it and/or modify it *
* under the terms version 2 of the GNU General Public License as published *
* by the Free Software Foundation. This program is distributed in the hope *
* that it will be useful, but WITHOUT ANY WARRANTY; without even the implied *
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
* See the GNU General Public License for more details. *
* You should have received a copy of the GNU General Public License along *
* with this program; if not, write to the Free Software Foundation, Inc., *
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
*****************************************************************************/
package org.compiere.model;
import java.sql.ResultSet;
import java.util.Properties;
import org.adempiere.exceptions.AdempiereException;
import org.compiere.util.Env;
public class MSSOPrincipalConfig extends X_SSO_PrincipalConfig
{
/**
*
*/
private static final long serialVersionUID = -6330419996581130413L;
public MSSOPrincipalConfig(Properties ctx, int MFA_SSOAuthentication_ID, String trxName)
{
super(ctx, MFA_SSOAuthentication_ID, trxName);
}
public MSSOPrincipalConfig(Properties ctx, ResultSet rs, String trxName)
{
super(ctx, rs, trxName);
}
public static MSSOPrincipalConfig getDefaultSSOPrincipalConfig()
{
return new Query(Env.getCtx(), Table_Name, COLUMNNAME_IsDefault + " = 'Y' ", null).setOnlyActiveRecords(true).firstOnly();
}
@Override
protected boolean beforeSave(boolean newRecord)
{
if (newRecord || is_ValueChanged(COLUMNNAME_IsDefault)|| is_ValueChanged(COLUMNNAME_IsActive))
{
if(!isActive())
{
setIsDefault(false);
}
if (isDefault() && getDefaultSSOPrincipalConfig() != null)
{
throw new AdempiereException("There can be only one default SSO Principal Configuration");
}
if (newRecord && getDefaultSSOPrincipalConfig() == null)
{
setIsDefault(true);
}
}
return super.beforeSave(newRecord);
}
}

View File

@ -101,6 +101,9 @@ public class MSysConfig extends X_AD_SysConfig
public static final String EMAIL_NOTIFY_2PACK = "EMAIL_NOTIFY_2PACK";
public static final String EMAIL_TEST_MAILTEXT_ID = "EMAIL_TEST_MAILTEXT_ID";
public static final String ENABLE_PAYMENTBOX_BUTTON = "ENABLE_PAYMENTBOX_BUTTON";
public static final String ENABLE_SSO = "ENABLE_SSO";
public static final String ENABLE_SSO_OSGI_CONSOLE = "ENABLE_SSO_OSGI_CONSOLE";
public static final String ENABLE_SSO_IDEMPIERE_MONITOR = "ENABLE_SSO_IDEMPIERE_MONITOR";
public static final String FEEDBACK_EMAIL_CC = "FEEDBACK_EMAIL_CC";
public static final String FEEDBACK_EMAIL_TO = "FEEDBACK_EMAIL_TO";
public static final String FORCE_POSTING_PRIOR_TO_PERIOD_CLOSE = "FORCE_POSTING_PRIOR_TO_PERIOD_CLOSE";
@ -176,6 +179,7 @@ public class MSysConfig extends X_AD_SysConfig
public static final String SYSTEM_IN_MAINTENANCE_MODE = "SYSTEM_IN_MAINTENANCE_MODE";
public static final String SYSTEM_INSERT_CHANGELOG = "SYSTEM_INSERT_CHANGELOG";
public static final String SYSTEM_NATIVE_SEQUENCE = "SYSTEM_NATIVE_SEQUENCE";
public static final String SSO_SELECT_ROLE = "SSO_SELECT_ROLE";
public static final String TAX_LOOKUP_SERVICE="TAX_LOOKUP_SERVICE";
public static final String TOP_MARGIN_PIXELS_FOR_HEADER = "TOP_MARGIN_PIXELS_FOR_HEADER";
public static final String TRACE_ALL_TRX_CONNECTION_GET = "TRACE_ALL_TRX_CONNECTION_GET";

View File

@ -194,16 +194,22 @@ public class MUser extends X_AD_User implements ImmutablePOSupport
return user;
}
public static MUser get (Properties ctx, String name, String password)
{
return MUser.get(ctx, name, password, false);
}
/**
* Get User
* @param ctx context
* @param name name
* @param password password
* @param isSSOLogin when isSSOLogin is true, password is ignored.
* @return user or null
*/
public static MUser get (Properties ctx, String name, String password)
public static MUser get (Properties ctx, String name, String password, boolean isSSOLogin)
{
if (name == null || name.length() == 0 || password == null || password.length() == 0)
if (name == null || name.length() == 0 || (!isSSOLogin && (password == null || password.length() == 0)))
{
s_log.warning ("Invalid Name/Password = " + name);
return null;
@ -250,8 +256,9 @@ public class MUser extends X_AD_User implements ImmutablePOSupport
if (system == null)
throw new IllegalStateException("No System Info");
if (system.isLDAP() && ! Util.isEmpty(user.getLDAPUser())) {
if (isSSOLogin) {
valid = true;
} else if (system.isLDAP() && ! Util.isEmpty(user.getLDAPUser())) {
valid = system.isLDAP(name, password);
} else if (hash_password) {
valid = user.authenticateHash(password);

View File

@ -31,7 +31,7 @@ public class X_AD_Client extends PO implements I_AD_Client, I_Persistent
/**
*
*/
private static final long serialVersionUID = 20230409L;
private static final long serialVersionUID = 20230522L;
/** Standard Constructor */
public X_AD_Client (Properties ctx, int AD_Client_ID, String trxName)
@ -254,6 +254,30 @@ public class X_AD_Client extends PO implements I_AD_Client, I_Persistent
return ii.intValue();
}
/** AuthenticationType AD_Reference_ID=200239 */
public static final int AUTHENTICATIONTYPE_AD_Reference_ID=200239;
/** Application and SSO = AAS */
public static final String AUTHENTICATIONTYPE_ApplicationAndSSO = "AAS";
/** Application Only = APO */
public static final String AUTHENTICATIONTYPE_ApplicationOnly = "APO";
/** SSO Only = SSO */
public static final String AUTHENTICATIONTYPE_SSOOnly = "SSO";
/** Set Authentication Type.
@param AuthenticationType Authentication Type
*/
public void setAuthenticationType (String AuthenticationType)
{
set_Value (COLUMNNAME_AuthenticationType, AuthenticationType);
}
/** Get Authentication Type.
@return Authentication Type */
public String getAuthenticationType()
{
return (String)get_Value(COLUMNNAME_AuthenticationType);
}
/** AutoArchive AD_Reference_ID=334 */
public static final int AUTOARCHIVE_AD_Reference_ID=334;
/** All (Reports, Documents) = 1 */

View File

@ -32,7 +32,7 @@ public class X_AD_User extends PO implements I_AD_User, I_Persistent
/**
*
*/
private static final long serialVersionUID = 20230409L;
private static final long serialVersionUID = 20230522L;
/** Standard Constructor */
public X_AD_User (Properties ctx, int AD_User_ID, String trxName)
@ -314,6 +314,30 @@ public class X_AD_User extends PO implements I_AD_User, I_Persistent
return (String)get_Value(COLUMNNAME_Answer);
}
/** AuthenticationType AD_Reference_ID=200239 */
public static final int AUTHENTICATIONTYPE_AD_Reference_ID=200239;
/** Application and SSO = AAS */
public static final String AUTHENTICATIONTYPE_ApplicationAndSSO = "AAS";
/** Application Only = APO */
public static final String AUTHENTICATIONTYPE_ApplicationOnly = "APO";
/** SSO Only = SSO */
public static final String AUTHENTICATIONTYPE_SSOOnly = "SSO";
/** Set Authentication Type.
@param AuthenticationType Authentication Type
*/
public void setAuthenticationType (String AuthenticationType)
{
set_Value (COLUMNNAME_AuthenticationType, AuthenticationType);
}
/** Get Authentication Type.
@return Authentication Type */
public String getAuthenticationType()
{
return (String)get_Value(COLUMNNAME_AuthenticationType);
}
/** Set Birthday.
@param Birthday Birthday or Anniversary day
*/

View File

@ -0,0 +1,328 @@
/******************************************************************************
* Product: iDempiere ERP & CRM Smart Business Solution *
* Copyright (C) 1999-2012 ComPiere, Inc. All Rights Reserved. *
* This program is free software, you can redistribute it and/or modify it *
* under the terms version 2 of the GNU General Public License as published *
* by the Free Software Foundation. This program is distributed in the hope *
* that it will be useful, but WITHOUT ANY WARRANTY, without even the implied *
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
* See the GNU General Public License for more details. *
* You should have received a copy of the GNU General Public License along *
* with this program, if not, write to the Free Software Foundation, Inc., *
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
* For the text or an alternative of this public license, you may reach us *
* ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA *
* or via info@compiere.org or http://www.compiere.org/license.html *
*****************************************************************************/
/** Generated Model - DO NOT CHANGE */
package org.compiere.model;
import java.sql.ResultSet;
import java.util.Properties;
/** Generated Model for SSO_PrincipalConfig
* @author iDempiere (generated)
* @version Release 11 - $Id$ */
@org.adempiere.base.Model(table="SSO_PrincipalConfig")
public class X_SSO_PrincipalConfig extends PO implements I_SSO_PrincipalConfig, I_Persistent
{
/**
*
*/
private static final long serialVersionUID = 20230728L;
/** Standard Constructor */
public X_SSO_PrincipalConfig (Properties ctx, int SSO_PrincipalConfig_ID, String trxName)
{
super (ctx, SSO_PrincipalConfig_ID, trxName);
/** if (SSO_PrincipalConfig_ID == 0)
{
setSSO_PrincipalConfig_ID (0);
setSSO_Provider (null);
} */
}
/** Standard Constructor */
public X_SSO_PrincipalConfig (Properties ctx, int SSO_PrincipalConfig_ID, String trxName, String ... virtualColumns)
{
super (ctx, SSO_PrincipalConfig_ID, trxName, virtualColumns);
/** if (SSO_PrincipalConfig_ID == 0)
{
setSSO_PrincipalConfig_ID (0);
setSSO_Provider (null);
} */
}
/** Standard Constructor */
public X_SSO_PrincipalConfig (Properties ctx, String SSO_PrincipalConfig_UU, String trxName)
{
super (ctx, SSO_PrincipalConfig_UU, trxName);
/** if (SSO_PrincipalConfig_UU == null)
{
setSSO_PrincipalConfig_ID (0);
setSSO_Provider (null);
} */
}
/** Standard Constructor */
public X_SSO_PrincipalConfig (Properties ctx, String SSO_PrincipalConfig_UU, String trxName, String ... virtualColumns)
{
super (ctx, SSO_PrincipalConfig_UU, trxName, virtualColumns);
/** if (SSO_PrincipalConfig_UU == null)
{
setSSO_PrincipalConfig_ID (0);
setSSO_Provider (null);
} */
}
/** Load Constructor */
public X_SSO_PrincipalConfig (Properties ctx, ResultSet rs, String trxName)
{
super (ctx, rs, trxName);
}
/** AccessLevel
* @return 4 - System
*/
protected int get_AccessLevel()
{
return accessLevel.intValue();
}
/** Load Meta Data */
protected POInfo initPO (Properties ctx)
{
POInfo poi = POInfo.getPOInfo (ctx, Table_ID, get_TrxName());
return poi;
}
public String toString()
{
StringBuilder sb = new StringBuilder ("X_SSO_PrincipalConfig[")
.append(get_ID()).append(",Name=").append(getName()).append("]");
return sb.toString();
}
/** Set Default.
@param IsDefault Default value
*/
public void setIsDefault (boolean IsDefault)
{
set_Value (COLUMNNAME_IsDefault, Boolean.valueOf(IsDefault));
}
/** Get Default.
@return Default value
*/
public boolean isDefault()
{
Object oo = get_Value(COLUMNNAME_IsDefault);
if (oo != null)
{
if (oo instanceof Boolean)
return ((Boolean)oo).booleanValue();
return "Y".equals(oo);
}
return false;
}
/** Set Name.
@param Name Alphanumeric identifier of the entity
*/
public void setName (String Name)
{
set_Value (COLUMNNAME_Name, Name);
}
/** Get Name.
@return Alphanumeric identifier of the entity
*/
public String getName()
{
return (String)get_Value(COLUMNNAME_Name);
}
/** Set Application Client ID.
@param SSO_ApplicationClientID SSO Application Client ID
*/
public void setSSO_ApplicationClientID (String SSO_ApplicationClientID)
{
set_Value (COLUMNNAME_SSO_ApplicationClientID, SSO_ApplicationClientID);
}
/** Get Application Client ID.
@return SSO Application Client ID
*/
public String getSSO_ApplicationClientID()
{
return (String)get_Value(COLUMNNAME_SSO_ApplicationClientID);
}
/** Set Application Discovery URI.
@param SSO_ApplicationDiscoveryURI SSO Application Discovery URI
*/
public void setSSO_ApplicationDiscoveryURI (String SSO_ApplicationDiscoveryURI)
{
set_Value (COLUMNNAME_SSO_ApplicationDiscoveryURI, SSO_ApplicationDiscoveryURI);
}
/** Get Application Discovery URI.
@return SSO Application Discovery URI
*/
public String getSSO_ApplicationDiscoveryURI()
{
return (String)get_Value(COLUMNNAME_SSO_ApplicationDiscoveryURI);
}
/** Set Application Logout URL.
@param SSO_ApplicationLogoutURL SSO Application Logout URL
*/
public void setSSO_ApplicationLogoutURL (String SSO_ApplicationLogoutURL)
{
set_Value (COLUMNNAME_SSO_ApplicationLogoutURL, SSO_ApplicationLogoutURL);
}
/** Get Application Logout URL.
@return SSO Application Logout URL
*/
public String getSSO_ApplicationLogoutURL()
{
return (String)get_Value(COLUMNNAME_SSO_ApplicationLogoutURL);
}
/** Set Application Redirect URIs.
@param SSO_ApplicationRedirectURIs SSO Application Redirect URIs
*/
public void setSSO_ApplicationRedirectURIs (String SSO_ApplicationRedirectURIs)
{
set_Value (COLUMNNAME_SSO_ApplicationRedirectURIs, SSO_ApplicationRedirectURIs);
}
/** Get Application Redirect URIs.
@return SSO Application Redirect URIs
*/
public String getSSO_ApplicationRedirectURIs()
{
return (String)get_Value(COLUMNNAME_SSO_ApplicationRedirectURIs);
}
/** Set Application Secret Key.
@param SSO_ApplicationSecretKey SSO Application Secret Key
*/
public void setSSO_ApplicationSecretKey (String SSO_ApplicationSecretKey)
{
set_Value (COLUMNNAME_SSO_ApplicationSecretKey, SSO_ApplicationSecretKey);
}
/** Get Application Secret Key.
@return SSO Application Secret Key
*/
public String getSSO_ApplicationSecretKey()
{
return (String)get_Value(COLUMNNAME_SSO_ApplicationSecretKey);
}
/** Set Tenant ID.
@param SSO_AuthorizationTenantID SSO Tenant ID
*/
public void setSSO_AuthorizationTenantID (String SSO_AuthorizationTenantID)
{
set_Value (COLUMNNAME_SSO_AuthorizationTenantID, SSO_AuthorizationTenantID);
}
/** Get Tenant ID.
@return SSO Tenant ID
*/
public String getSSO_AuthorizationTenantID()
{
return (String)get_Value(COLUMNNAME_SSO_AuthorizationTenantID);
}
/** Set iDempiere Monitor Redirect URIs.
@param SSO_IDempMonitorRedirectURIs iDempiere Monitor Redirect URIs
*/
public void setSSO_IDempMonitorRedirectURIs (String SSO_IDempMonitorRedirectURIs)
{
set_Value (COLUMNNAME_SSO_IDempMonitorRedirectURIs, SSO_IDempMonitorRedirectURIs);
}
/** Get iDempiere Monitor Redirect URIs.
@return iDempiere Monitor Redirect URIs
*/
public String getSSO_IDempMonitorRedirectURIs()
{
return (String)get_Value(COLUMNNAME_SSO_IDempMonitorRedirectURIs);
}
/** Set Felix Web Console Redirect URIs.
@param SSO_OSGIRedirectURIs Apache Felix Web Console Bundles Redirect URIs
*/
public void setSSO_OSGIRedirectURIs (String SSO_OSGIRedirectURIs)
{
set_Value (COLUMNNAME_SSO_OSGIRedirectURIs, SSO_OSGIRedirectURIs);
}
/** Get Felix Web Console Redirect URIs.
@return Apache Felix Web Console Bundles Redirect URIs
*/
public String getSSO_OSGIRedirectURIs()
{
return (String)get_Value(COLUMNNAME_SSO_OSGIRedirectURIs);
}
/** Set SSO Configuration.
@param SSO_PrincipalConfig_ID SSO Configuration
*/
public void setSSO_PrincipalConfig_ID (int SSO_PrincipalConfig_ID)
{
if (SSO_PrincipalConfig_ID < 1)
set_ValueNoCheck (COLUMNNAME_SSO_PrincipalConfig_ID, null);
else
set_ValueNoCheck (COLUMNNAME_SSO_PrincipalConfig_ID, Integer.valueOf(SSO_PrincipalConfig_ID));
}
/** Get SSO Configuration.
@return SSO Configuration */
public int getSSO_PrincipalConfig_ID()
{
Integer ii = (Integer)get_Value(COLUMNNAME_SSO_PrincipalConfig_ID);
if (ii == null)
return 0;
return ii.intValue();
}
/** Set SSO Configuration UU.
@param SSO_PrincipalConfig_UU SSO Configuration UU
*/
public void setSSO_PrincipalConfig_UU (String SSO_PrincipalConfig_UU)
{
set_ValueNoCheck (COLUMNNAME_SSO_PrincipalConfig_UU, SSO_PrincipalConfig_UU);
}
/** Get SSO Configuration UU.
@return SSO Configuration UU */
public String getSSO_PrincipalConfig_UU()
{
return (String)get_Value(COLUMNNAME_SSO_PrincipalConfig_UU);
}
/** SSO_Provider AD_Reference_ID=200213 */
public static final int SSO_PROVIDER_AD_Reference_ID=200213;
/** Set SSO Provider.
@param SSO_Provider Single Sign-On (SSO) Providers ( Microsoft Azure , Google, Jump Cloud etc..)
*/
public void setSSO_Provider (String SSO_Provider)
{
set_Value (COLUMNNAME_SSO_Provider, SSO_Provider);
}
/** Get SSO Provider.
@return Single Sign-On (SSO) Providers ( Microsoft Azure , Google, Jump Cloud etc..)
*/
public String getSSO_Provider()
{
return (String)get_Value(COLUMNNAME_SSO_Provider);
}
}

View File

@ -22,6 +22,7 @@ import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Timestamp;
import java.text.ParseException;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
@ -31,6 +32,8 @@ import java.util.logging.Level;
import javax.swing.JOptionPane;
import org.adempiere.base.sso.ISSOPrincipalService;
import org.adempiere.base.sso.SSOUtils;
import org.adempiere.exceptions.DBException;
import org.compiere.Adempiere;
import org.compiere.db.CConnection;
@ -70,6 +73,7 @@ public class Login
{
private String loginErrMsg;
private boolean isPasswordExpired;
private boolean isSSOLogin = false;
public String getLoginErrMsg() {
return loginErrMsg;
@ -1255,15 +1259,29 @@ public class Login
return getClients(app_user, app_pwd, null);
}
/**
* Validate Client Login. Sets Context with login info
*
* @param app_user user id
* @param app_pwd password
* @param roleTypes comma separated list of the role types allowed to login
* (NULL can be added)
* @return client array or null if in error.
*/
public KeyNamePair[] getClients(String app_user, String app_pwd, String roleTypes) {
return getClients(app_user, app_pwd, roleTypes, null);
}
/**
* Validate Client Login.
* Sets Context with login info
* @param app_user user id
* @param app_pwd password
* @param roleTypes comma separated list of the role types allowed to login (NULL can be added)
* @param token validate the user with a token for SSO login.
* @return client array or null if in error.
*/
public KeyNamePair[] getClients(String app_user, String app_pwd, String roleTypes) {
public KeyNamePair[] getClients(String app_user, String app_pwd, String roleTypes, Object token) {
if (log.isLoggable(Level.INFO)) log.info("User=" + app_user);
if (Util.isEmpty(app_user))
@ -1274,11 +1292,21 @@ public class Login
// Authentication
boolean authenticated = false;
try
{
isSSOLogin = token != null && SSOUtils.getSSOPrincipalService() != null && SSOUtils.getSSOPrincipalService().getUserName(token).equalsIgnoreCase(app_user);
}
catch (ParseException e)
{
log.warning("Parsing failed: " + e.getLocalizedMessage());
isSSOLogin = false;
}
MSystem system = MSystem.get(m_ctx);
if (system == null)
throw new IllegalStateException("No System Info");
if (app_pwd == null || app_pwd.length() == 0)
if (!isSSOLogin && (app_pwd == null || app_pwd.length() == 0))
{
log.warning("No Apps Password");
return null;
@ -1287,7 +1315,7 @@ public class Login
loginErrMsg = null;
isPasswordExpired = false;
if (system.isLDAP())
if (!isSSOLogin && system.isLDAP())
{
authenticated = system.isLDAP(app_user, app_pwd);
if (authenticated) {
@ -1329,6 +1357,16 @@ public class Login
where.append("EMail=?");
else
where.append("COALESCE(LDAPUser,Name)=?");
boolean isSSOEnable = MSysConfig.getBooleanValue(MSysConfig.ENABLE_SSO, false);
ISSOPrincipalService ssoPrincipal = SSOUtils.getSSOPrincipalService();
where.append(" AND EXISTS (SELECT * FROM AD_User u ")
.append(" INNER JOIN AD_Client c ON (u.AD_Client_ID = c.AD_Client_ID) ")
.append(" WHERE COALESCE(u.AuthenticationType, c.AuthenticationType) IN ");
//If Enable_SSO=N then don't allow SSO only users.
where.append((isSSOEnable && ssoPrincipal != null && isSSOLogin) ? " ('SSO', 'AAS') " : " ('APO', 'AAS') ");
where.append(" OR COALESCE(u.AuthenticationType, c.AuthenticationType) IS NULL AND u.AD_User_ID = AD_User.AD_User_ID) ");
String whereRoleType = MRole.getWhereRoleType(roleTypes, "r");
where.append(" AND")
.append(" EXISTS (SELECT * FROM AD_User_Roles ur")
@ -1356,10 +1394,11 @@ public class Login
}
if (users.size() == 0) {
log.saveError("UserPwdError", app_user, false);
log.saveError(isSSOLogin ? "UserNotFoundError": "UserPwdError", app_user, false);
return null;
}
log.log(Level.FINE ,users.size() + " matched user found for :" + app_user);
int MAX_ACCOUNT_LOCK_MINUTES = MSysConfig.getIntValue(MSysConfig.USER_LOCKING_MAX_ACCOUNT_LOCK_MINUTES, 0);
int MAX_INACTIVE_PERIOD_DAY = MSysConfig.getIntValue(MSysConfig.USER_LOCKING_MAX_INACTIVE_PERIOD_DAY, 0);
int MAX_PASSWORD_AGE = MSysConfig.getIntValue(MSysConfig.USER_LOCKING_MAX_PASSWORD_AGE_DAY, 0);
@ -1375,7 +1414,7 @@ public class Login
clientsValidated.add(user.getAD_Client_ID());
boolean valid = false;
// authenticated by ldap
if (authenticated) {
if (authenticated || isSSOLogin) {
valid = true;
} else {
if (!system.isLDAP() || Util.isEmpty(user.getLDAPUser())) {
@ -1427,6 +1466,7 @@ public class Login
if (! Util.isEmpty(whereRoleType)) {
sql.append(" AND ").append(whereRoleType);
}
sql.append(" AND cli.AuthenticationType IN ").append((isSSOEnable && ssoPrincipal != null && isSSOLogin) ? " ('SSO', 'AAS') " : " ('APO', 'AAS') ");
sql.append(" AND ur.AD_User_ID=? ORDER BY cli.Name");
PreparedStatement pstmt=null;
ResultSet rs=null;
@ -1715,7 +1755,7 @@ public class Login
loginErrMsg = null;
isPasswordExpired = false;
boolean isSSOEnable = MSysConfig.getBooleanValue(MSysConfig.ENABLE_SSO, false);
int AD_User_ID = Env.getContextAsInt(m_ctx, Env.AD_USER_ID);
KeyNamePair[] retValue = null;
ArrayList<KeyNamePair> clientList = new ArrayList<KeyNamePair>();
@ -1726,7 +1766,9 @@ public class Login
.append(" WHERE ur.IsActive='Y'")
.append(" AND cli.IsActive='Y'")
.append(" AND u.IsActive='Y'")
.append(" AND u.AD_User_ID=? ORDER BY cli.Name");
.append(" AND u.AD_User_ID=? ")
.append(" AND cli.AuthenticationType IN ").append((isSSOEnable && SSOUtils.getSSOPrincipalService() != null && isSSOLogin) ? " ('SSO', 'AAS') " : " ('APO', 'AAS') ")
.append(" ORDER BY cli.Name");
PreparedStatement pstmt = null;
ResultSet rs = null;
try {

View File

@ -24,3 +24,4 @@ Import-Package: javax.servlet;version="4.0",
Bundle-ManifestVersion: 2
Bundle-ClassPath: .
Automatic-Module-Name: org.adempiere.eclipse.equinox.http.servlet
Require-Bundle: org.adempiere.base;bundle-version="10.0.0"

View File

@ -13,10 +13,24 @@ package org.adempiere.eclipse.equinox.http.servlet;
import java.io.IOException;
import java.util.Enumeration;
import javax.servlet.*;
import java.util.logging.Level;
import javax.servlet.Filter;
import javax.servlet.FilterChain;
import javax.servlet.FilterConfig;
import javax.servlet.ServletConfig;
import javax.servlet.ServletContext;
import javax.servlet.ServletException;
import javax.servlet.ServletRequest;
import javax.servlet.ServletResponse;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.adempiere.base.sso.ISSOPrincipalService;
import org.adempiere.base.sso.SSOUtils;
import org.compiere.model.MSysConfig;
import org.compiere.util.CLogger;
/**
*
* {@link BridgeServlet} which implements HTTP {@link Filter} to declare "BridgeServlet" as an HTTP Filter (see &gt;=2.3 Servlet spec):
@ -38,6 +52,8 @@ public class BridgeFilter extends BridgeServlet implements Filter {
private static final long serialVersionUID = 1309373924501049438L;
/** Logger */
protected static CLogger log = CLogger.getCLogger(BridgeFilter.class);
private ServletConfigAdaptor servletConfig;
public void init(FilterConfig filterConfig) throws ServletException {
@ -48,6 +64,48 @@ public class BridgeFilter extends BridgeServlet implements Filter {
public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException {
HttpServletRequest req = (HttpServletRequest) request;
HttpServletResponse resp = (HttpServletResponse) response;
// Ignore the resource request
if (SSOUtils.isResourceRequest(req, false))
{
super.process(req, resp, chain);
return;
}
boolean isRedirectToLoginOnError = false;
boolean isSSOEnable = MSysConfig.getBooleanValue(MSysConfig.ENABLE_SSO_OSGI_CONSOLE, false);
if (isSSOEnable) {
ISSOPrincipalService m_SSOPrincipal = null;
try
{
m_SSOPrincipal = SSOUtils.getSSOPrincipalService();
if (m_SSOPrincipal != null) {
if (m_SSOPrincipal.hasAuthenticationCode(req, resp)) {
// Use authentication code to get token
String currentUri = req.getRequestURL().toString();
m_SSOPrincipal.getAuthenticationToken(req, resp, SSOUtils.SSO_MODE_OSGI);
resp.sendRedirect(currentUri);
} else if (!m_SSOPrincipal.isAuthenticated(req, resp)) {
// Redirect to SSO sing in page for authentication
m_SSOPrincipal.redirectForAuthentication(req, resp, SSOUtils.SSO_MODE_OSGI);
return;
}
}
} catch (Throwable exc) {
log.log(Level.SEVERE, "Exception while authenticating: ", exc);
if (m_SSOPrincipal != null)
m_SSOPrincipal.removePrincipalFromSession(req);
if (isRedirectToLoginOnError) {
resp.sendRedirect("osgi/system/console/bundles");
} else {
resp.setStatus(500);
response.setContentType("text/html");
response.getWriter().append(SSOUtils.getCreateErrorResponce(exc.getLocalizedMessage()));
}
return;
}
}
// Call process class with FilterChain.
super.process(req, resp, chain);
}

View File

@ -12,14 +12,27 @@
package org.adempiere.eclipse.equinox.http.servlet;
import java.io.IOException;
import javax.servlet.*;
import java.util.logging.Level;
import javax.servlet.Servlet;
import javax.servlet.ServletConfig;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.adempiere.base.sso.ISSOPrincipalService;
import org.adempiere.base.sso.SSOUtils;
import org.compiere.model.MSysConfig;
import org.compiere.model.MUser;
import org.compiere.util.CLogger;
import org.compiere.util.Env;
import org.osgi.service.http.HttpContext;
//This class wraps the servlet object registered in the HttpService.registerServlet call, to manage the context classloader when handleRequests are being asked.
public class ServletRegistration extends Registration {
/** Logger */
protected static CLogger log = CLogger.getCLogger(ServletRegistration.class);
private Servlet servlet; //The actual servlet object registered against the http service. All requests will eventually be delegated to it.
private HttpContext httpContext; //The context used during the registration of the servlet
private ClassLoader registeredContextClassLoader;
@ -53,12 +66,38 @@ public class ServletRegistration extends Registration {
}
//Delegate the handling of the request to the actual servlet
/**
* @param req
* @param resp
* @throws IOException
* @throws ServletException
*/
public void service(HttpServletRequest req, HttpServletResponse resp) throws IOException, ServletException {
ClassLoader original = Thread.currentThread().getContextClassLoader();
try {
Thread.currentThread().setContextClassLoader(registeredContextClassLoader);
if (httpContext.handleSecurity(req, resp))
boolean isSSOEnable = MSysConfig.getBooleanValue(MSysConfig.ENABLE_SSO_OSGI_CONSOLE, false);
if (isSSOEnable && SSOUtils.getSSOPrincipalService() != null)
{
Object token = req.getSession().getAttribute(ISSOPrincipalService.SSO_PRINCIPAL_SESSION_TOKEN);
if (checkSSOAuthorization(token))
{
servlet.service(req, resp);
if (req.getPathInfo().endsWith("logout"))
{
req.getSession().removeAttribute(ISSOPrincipalService.SSO_PRINCIPAL_SESSION_TOKEN);
resp.sendRedirect("osgi/system/console/bundles");
}
}
else
{
req.getSession().removeAttribute(ISSOPrincipalService.SSO_PRINCIPAL_SESSION_TOKEN);
}
}
else if (httpContext.handleSecurity(req, resp))
{
servlet.service(req, resp);
}
} finally {
Thread.currentThread().setContextClassLoader(original);
}
@ -71,4 +110,38 @@ public class ServletRegistration extends Registration {
public HttpContext getHttpContext() {
return httpContext;
}
private boolean checkSSOAuthorization(Object token)
{
if (token == null)
return false;
try
{
String username = SSOUtils.getSSOPrincipalService().getUserName(token);
return validateUser(username, null, true);
}
catch (Exception e)
{
log.log(Level.SEVERE, "SSOAuthorizationChekError", e);
}
return false;
}
private boolean validateUser(String name, String password, boolean isSSO)
{
MUser user = MUser.get(Env.getCtx(), name, password, isSSO);
if (user == null)
{
log.warning ("User not found: '" + name);
return false;
}
if (!user.isAdministrator() && !user.hasURLFormAccess("/osgi/system/console"))
{
log.warning ("User doesn't have access to /osgi/system/console = " + name);
return false;
}
if (log.isLoggable(Level.INFO)) log.info ("Name=" + name);
return Boolean.TRUE;
}
}

View File

@ -29,12 +29,14 @@ import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;
import org.adempiere.base.sso.ISSOPrincipalService;
import org.adempiere.base.sso.SSOUtils;
import org.apache.commons.codec.binary.Base64;
import org.compiere.model.MSysConfig;
import org.compiere.model.MUser;
import org.compiere.util.CLogger;
import org.compiere.util.Env;
import org.apache.commons.codec.binary.Base64;
/**
* Adempiere Monitor Filter.
* Application Server independent check of username/password
@ -56,7 +58,6 @@ public class AdempiereMonitorFilter implements Filter
/** Logger */
protected CLogger log = CLogger.getCLogger(getClass());
/** Authorization ID */
private static final String AUTHORIZATION = "AdempiereAuthorization";
/** Authorization Marker */
@ -93,30 +94,70 @@ public class AdempiereMonitorFilter implements Filter
request.getRequestDispatcher(errorPage).forward(request, response);
return;
}
boolean isSSOEnable = MSysConfig.getBooleanValue(MSysConfig.ENABLE_SSO_IDEMPIERE_MONITOR, false);
HttpServletRequest req = (HttpServletRequest)request;
HttpServletResponse resp = (HttpServletResponse)response;
// Previously checked
HttpSession session = req.getSession(true);
Long compare = (Long)session.getAttribute(AUTHORIZATION);
if (compare != null && compare.compareTo(m_authorization) == 0)
{
pass = true;
boolean isRedirectToLoginOnError = false;
ISSOPrincipalService m_SSOPrincipal = null;
if (isSSOEnable) {
try {
m_SSOPrincipal = SSOUtils.getSSOPrincipalService();
if (m_SSOPrincipal != null) {
if (m_SSOPrincipal.hasAuthenticationCode(req, resp)) {
// Use authentication code get get token
String currentUri = req.getRequestURL().toString();
m_SSOPrincipal.getAuthenticationToken(req, resp, SSOUtils.SSO_MODE_MONITOR);
resp.sendRedirect(currentUri);
} else if (!m_SSOPrincipal.isAuthenticated(req, resp)) {
// Redirect to SSO sing in page for authentication
m_SSOPrincipal.redirectForAuthentication(req, resp, SSOUtils.SSO_MODE_MONITOR);
return;
}
else if (checkAuthorization (req.getHeader("Authorization")))
// validate the user
if (checkSSOAuthorization(m_SSOPrincipal, req.getSession().getAttribute(ISSOPrincipalService.SSO_PRINCIPAL_SESSION_TOKEN)))
{
chain.doFilter(request, response);
return;
}
}
req.getSession().removeAttribute(ISSOPrincipalService.SSO_PRINCIPAL_SESSION_TOKEN);
} catch (Throwable exc) {
log.log(Level.SEVERE, "Exception while authenticating: ", exc);
if (m_SSOPrincipal != null)
m_SSOPrincipal.removePrincipalFromSession(req);
if (isRedirectToLoginOnError) {
resp.sendRedirect("idempiereMonitor");
} else {
resp.setStatus(500);
response.setContentType("text/html");
response.getWriter().append(SSOUtils.getCreateErrorResponce(exc.getLocalizedMessage()));
}
return;
}
}
if (m_SSOPrincipal == null || !isSSOEnable)
{
HttpSession session = req.getSession(true);
// Previously checked
Long compare = (Long) session.getAttribute(AUTHORIZATION);
if (compare != null && compare.compareTo(m_authorization) == 0) {
pass = true;
} else if (checkAuthorization(req.getHeader("Authorization"))) {
session.setAttribute(AUTHORIZATION, m_authorization);
pass = true;
}
// --------------------------------------------
if (pass)
{
if (pass) {
chain.doFilter(request, response);
}
else
{
} else {
resp.setStatus(HttpServletResponse.SC_UNAUTHORIZED);
resp.setHeader("WWW-Authenticate", "BASIC realm=\"Adempiere Server\"");
}
}
return;
}
catch (Exception e)
@ -126,6 +167,22 @@ public class AdempiereMonitorFilter implements Filter
request.getRequestDispatcher(errorPage).forward(request, response);
} // doFilter
private boolean checkSSOAuthorization(ISSOPrincipalService principalService, Object token)
{
if (token == null)
return false;
try
{
String username = principalService.getUserName(token);
return validateUser(username, null, true);
}
catch (Exception e)
{
log.log(Level.SEVERE, "check", e);
}
return false;
}
/**
* Check Authorization
* @param authorization authorization
@ -144,7 +201,18 @@ public class AdempiereMonitorFilter implements Filter
int index = namePassword.indexOf(':');
String name = namePassword.substring(0, index);
String password = namePassword.substring(index+1);
MUser user = MUser.get(Env.getCtx(), name, password);
return validateUser(name, password, false);
}
catch (Exception e)
{
log.log(Level.SEVERE, "check", e);
}
return false;
} // check
private boolean validateUser(String name, String password, boolean isSSO)
{
MUser user = MUser.get(Env.getCtx(), name, password, isSSO);
if (user == null)
{
log.warning ("User not found: '" + name);
@ -158,12 +226,6 @@ public class AdempiereMonitorFilter implements Filter
if (log.isLoggable(Level.INFO)) log.info ("Name=" + name);
return true;
}
catch (Exception e)
{
log.log(Level.SEVERE, "check", e);
}
return false;
} // check
/**
* Destroy

View File

@ -30,6 +30,8 @@ import javax.servlet.ServletRequest;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpSession;
import org.adempiere.base.sso.ISSOPrincipalService;
import org.adempiere.base.sso.SSOUtils;
import org.adempiere.util.ServerContext;
import org.adempiere.util.ServerContextURLHandler;
import org.adempiere.webui.apps.AEnv;
@ -497,6 +499,9 @@ public class AdempiereWebUI extends Window implements EventListener<Event>, IWeb
final Desktop desktop = Executions.getCurrent().getDesktop();
final WebApp wapp = desktop.getWebApp();
final DesktopCache desktopCache = ((WebAppCtrl) wapp).getDesktopCache(desktop.getSession());
boolean isAdminLogin = false;
if (desktop.getSession().getAttribute(ISSOPrincipalService.SSO_ADMIN_LOGIN) != null)
isAdminLogin = (boolean)desktop.getSession().getAttribute(ISSOPrincipalService.SSO_ADMIN_LOGIN);
final Session session = logout0();
//clear context, invalidate session
@ -505,7 +510,7 @@ public class AdempiereWebUI extends Window implements EventListener<Event>, IWeb
desktop.setAttribute(DESKTOP_SESSION_INVALIDATED_ATTR, Boolean.TRUE);
//redirect to login page
Executions.sendRedirect("index.zul");
Executions.sendRedirect(isAdminLogin ? "admin.zul" : "index.zul");
try {
desktopCache.removeDesktop(desktop);
@ -752,12 +757,13 @@ public class AdempiereWebUI extends Window implements EventListener<Event>, IWeb
String attribute = attributes.nextElement();
//need to keep zk's session attributes
if (attribute.contains("zkoss."))
if (attribute.contains("zkoss.") || attribute.startsWith("sso."))
continue;
httpSession.removeAttribute(attribute);
}
httpSession.setAttribute(SSOUtils.ISCHANGEROLE_REQUEST, true);
//logout ad_session
AEnv.logout();

View File

@ -528,7 +528,7 @@ public class LoginPanel extends Window implements EventListener<Event>
for(int i = 0; i < lstLanguage.getItemCount(); i++)
{
Comboitem li = lstLanguage.getItemAtIndex(i);
if(li.getLabel().equals(initDefault))
if (li.getLabel().equals(initDefault) || li.getValue().equals(initDefault))
{
lstLanguage.setSelectedIndex(i);
languageChanged(li.getLabel());

View File

@ -23,12 +23,17 @@
package org.adempiere.webui.panel;
import java.io.IOException;
import java.sql.Timestamp;
import java.util.ArrayList;
import java.util.Locale;
import java.util.Properties;
import org.adempiere.base.sso.SSOUtils;
import org.adempiere.util.Callback;
import org.adempiere.webui.AdempiereIdGenerator;
import org.adempiere.webui.LayoutUtils;
import org.adempiere.webui.apps.AEnv;
import org.adempiere.webui.component.Button;
import org.adempiere.webui.component.ComboItem;
import org.adempiere.webui.component.Combobox;
@ -54,11 +59,14 @@ import org.compiere.util.Login;
import org.compiere.util.Msg;
import org.compiere.util.Util;
import org.compiere.util.WebUtil;
import org.zkoss.util.Locales;
import org.zkoss.web.Attributes;
import org.zkoss.zhtml.Table;
import org.zkoss.zhtml.Td;
import org.zkoss.zhtml.Tr;
import org.zkoss.zk.au.out.AuFocus;
import org.zkoss.zk.au.out.AuScript;
import org.zkoss.zk.ui.Desktop;
import org.zkoss.zk.ui.AbstractComponent;
import org.zkoss.zk.ui.Executions;
import org.zkoss.zk.ui.WrongValueException;
@ -92,7 +100,11 @@ public class RolePanel extends Window implements EventListener<Event>, Deferrabl
protected Combobox lstRole, lstClient, lstOrganisation, lstWarehouse;
protected Label lblRole, lblClient, lblDef, lblOrganisation, lblWarehouse, lblDate;
protected Label lblLanguage;
protected WDateEditor lstDate;
protected Combobox lstLanguage;
protected String validLstLanguage = null;
protected ConfirmPanel pnlButtons;
/** Context */
protected Properties m_ctx;
@ -273,6 +285,18 @@ public class RolePanel extends Window implements EventListener<Event>, Deferrabl
tr.appendChild(td);
td.appendChild(lstWarehouse);
tr = new Tr();
tr.setId("rowLanguage");
table.appendChild(tr);
td = new Td();
tr.appendChild(td);
td.setSclass(ITheme.LOGIN_LABEL_CLASS);
td.appendChild(lblLanguage.rightAlign());
td = new Td();
td.setSclass(ITheme.LOGIN_FIELD_CLASS);
tr.appendChild(td);
td.appendChild(lstLanguage);
tr = new Tr();
tr.setId("rowDate");
table.appendChild(tr);
@ -287,7 +311,8 @@ public class RolePanel extends Window implements EventListener<Event>, Deferrabl
div = new Div();
div.setSclass(ITheme.LOGIN_BOX_FOOTER_CLASS);
ConfirmPanel pnlButtons = new ConfirmPanel(true, false, false, false, false, false, true);
pnlButtons = new ConfirmPanel(true, false, false, false, false, false, true);
pnlButtons.addActionListener(this);
Button okBtn = pnlButtons.getButton(ConfirmPanel.A_OK);
okBtn.setWidgetListener("onClick", "zAu.cmd0.showBusy(null)");
@ -304,6 +329,9 @@ public class RolePanel extends Window implements EventListener<Event>, Deferrabl
pnlButtons.getButton(ConfirmPanel.A_CANCEL).setSclass(ITheme.LOGIN_BUTTON_CLASS);
div.appendChild(pnlButtons);
this.appendChild(div);
if(validLstLanguage!=null)
languageChanged(validLstLanguage);
}
/**
@ -333,6 +361,10 @@ public class RolePanel extends Window implements EventListener<Event>, Deferrabl
lblWarehouse.setId("lblWarehouse");
lblWarehouse.setValue(Msg.getMsg(language,"Warehouse"));
lblLanguage = new Label();
lblLanguage.setId("lblLanguage");
lblLanguage.setValue("Language");
lblDate = new Label();
lblDate.setId("lblDate");
lblDate.setValue(Msg.getMsg(language,"Date"));
@ -415,6 +447,36 @@ public class RolePanel extends Window implements EventListener<Event>, Deferrabl
lstDate.setReadWrite(false);
}
lstLanguage = new Combobox();
lstLanguage.setAutocomplete(true);
lstLanguage.setAutodrop(true);
lstLanguage.setId("lstLanguage");
ZKUpdateUtil.setWidth(lstLanguage, "220px");
// Update Language List
lstLanguage.getItems().clear();
ArrayList<String> supported = Env.getLoginLanguages();
String[] availableLanguages = Language.getNames();
for (String langName : availableLanguages)
{
Language lang = Language.getLanguage(langName);
if (!supported.contains(lang.getAD_Language()))
continue;
lstLanguage.appendItem(langName, lang.getAD_Language());
}
if(language!=null)
{
validLstLanguage = language.getName();
lstLanguage.setValue(validLstLanguage);
}
else if (lstLanguage.getItems().size() > 0)
{
validLstLanguage = (String) lstLanguage.getItems().get(0).getLabel();
lstLanguage.setValue(validLstLanguage);
}
lstLanguage.addEventListener(Events.ON_SELECT, this);
setUserID();
updateRoleList();
@ -474,6 +536,75 @@ public class RolePanel extends Window implements EventListener<Event>, Deferrabl
}
setUserID();
updateOrganisationList();
updateLanguage();
}
private void updateLanguage()
{
UserPreference userPreference = SessionManager.getSessionApplication().getUserPreference();
String initDefault = userPreference.getProperty(UserPreference.P_LANGUAGE);
for (int i = 0; i < lstLanguage.getItemCount(); i++)
{
Comboitem li = lstLanguage.getItemAtIndex(i);
if (li.getLabel().equals(initDefault))
{
lstLanguage.setSelectedIndex(i);
languageChanged(li.getLabel()); // Elaine 2009/04/17 language changed
break;
}
}
if (lstLanguage.getItemCount() == 1)
{
lstLanguage.setSelectedIndex(0);
lstLanguage.setEnabled(false);
}
else
{
lstLanguage.setEnabled(true);
}
}
private void languageChanged(String langName)
{
Language language = findLanguage(langName);
lblClient.setValue(Msg.getMsg(language, "Client"));
lblRole.setValue(Msg.getMsg(language, "Role"));
lblDef.setValue(Msg.getMsg(language, "Defaults"));
lblOrganisation.setValue(Msg.getMsg(language, "Organization"));
lblWarehouse.setValue(Msg.getMsg(language, "Warehouse"));
lblLanguage.setValue(Msg.getMsg(language, "Language"));
lblDate.setValue(Msg.getMsg(language, "Date"));
if (pnlButtons != null) {
pnlButtons.getButton(ConfirmPanel.A_OK).setLabel(Util.cleanAmp(Msg.getMsg(language, ConfirmPanel.A_OK)));
pnlButtons.getButton(ConfirmPanel.A_HELP)
.setLabel(Util.cleanAmp(Msg.getMsg(language, ConfirmPanel.A_HELP)));
pnlButtons.getButton(ConfirmPanel.A_CANCEL)
.setLabel(Util.cleanAmp(Msg.getMsg(language, ConfirmPanel.A_CANCEL)));
}
}
private Language findLanguage(String langName)
{
Language tmp = Language.getLanguage(langName);
Language language = new Language(tmp.getName(), tmp.getAD_Language(), tmp.getLocale(), tmp.isDecimalPoint(),
tmp.getDateFormat().toPattern(), tmp.getMediaSize());
Env.verifyLanguage(m_ctx, language);
Env.setContext(m_ctx, Env.LANGUAGE, language.getAD_Language());
Env.setContext(m_ctx, AEnv.LOCALE, language.getLocale().toString());
// cph::erp added this in order to get the processing dialog in the correct language
Locale locale = language.getLocale();
try
{
Clients.reloadMessages(locale);
}
catch (IOException e)
{
Dialog.warn(0, e.getLocalizedMessage(), e.getMessage());
}
Locales.setThreadLocal(locale);
// cph::erp end
return language;
}
/**
@ -583,6 +714,19 @@ public class RolePanel extends Window implements EventListener<Event>, Deferrabl
}
else if(eventCompId.equals(lstOrganisation.getId()))
updateWarehouseList();
else if (eventCompId.equals(lstLanguage.getId()))
{
if (lstLanguage.getSelectedItem() == null)
{
lstLanguage.setValue(validLstLanguage);
}
else
{
validLstLanguage = lstLanguage.getSelectedItem().getLabel();
}
languageChanged(validLstLanguage);
}
}
if (event.getTarget().getId().equals(ConfirmPanel.A_OK))
{
@ -678,6 +822,7 @@ public class RolePanel extends Window implements EventListener<Event>, Deferrabl
Comboitem lstItemClient = lstClient.getSelectedItem();
Comboitem lstItemOrg = lstOrganisation.getSelectedItem();
Comboitem lstItemWarehouse = lstWarehouse.getSelectedItem();
Comboitem lstItemLanguage = lstLanguage.getSelectedItem();
if(lstItemRole == null || lstItemRole.getValue() == null)
{
@ -718,6 +863,9 @@ public class RolePanel extends Window implements EventListener<Event>, Deferrabl
// Elaine 2009/02/06 save preference to AD_Preference
UserPreference userPreference = SessionManager.getSessionApplication().getUserPreference();
if (lstItemLanguage != null && lstItemLanguage.getValue() != null)
userPreference.setProperty(UserPreference.P_LANGUAGE, (String) lstItemLanguage.getValue());
else
userPreference.setProperty(UserPreference.P_LANGUAGE, Env.getContext(m_ctx, UserPreference.LANGUAGE_NAME));
userPreference.setProperty(UserPreference.P_ROLE, (String) lstItemRole.getValue());
userPreference.setProperty(UserPreference.P_CLIENT, (String) lstItemClient.getValue());
@ -729,12 +877,33 @@ public class RolePanel extends Window implements EventListener<Event>, Deferrabl
// force reload of default role when more than 1 client
if (lstClient.getChildren().size() > 1)
MRole.getDefault(m_ctx, true);
//
String langName = null;
if (lstLanguage.getSelectedItem() != null)
langName = (String) lstLanguage.getSelectedItem().getLabel();
else
langName = Language.getBaseLanguage().getName();
Language language = findLanguage(langName);
Env.setContext(m_ctx, UserPreference.LANGUAGE_NAME, language.getName());
Locale locale = language.getLocale();
Desktop desktop = Executions.getCurrent().getDesktop();
desktop.getSession().setAttribute(Attributes.PREFERRED_LOCALE, locale);
try
{
Clients.reloadMessages(locale);
}
catch (IOException e)
{
Dialog.warn(0, e.getLocalizedMessage(), e.getMessage());
}
Locales.setThreadLocal(locale);
if (m_isClientDefined || isMFAValidated)
wndLogin.loginCompleted(login, orgKNPair, this);
else
wndLogin.validateMFA(orgKNPair, m_isClientDefined, m_userName, m_showRolePanel, m_clientKNPairs);
desktop.getSession().setAttribute(SSOUtils.ISCHANGEROLE_REQUEST, false);
}
@Override

View File

@ -0,0 +1,152 @@
/******************************************************************************
* Copyright (C) 2016 Logilite Technologies LLP *
* This program is free software; you can redistribute it and/or modify it *
* under the terms version 2 of the GNU General Public License as published *
* by the Free Software Foundation. This program is distributed in the hope *
* that it will be useful, but WITHOUT ANY WARRANTY; without even the implied *
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
* See the GNU General Public License for more details. *
* You should have received a copy of the GNU General Public License along *
* with this program; if not, write to the Free Software Foundation, Inc., *
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
*****************************************************************************/
package org.adempiere.webui.sso.filter;
import java.io.IOException;
import java.util.logging.Level;
import javax.servlet.Filter;
import javax.servlet.FilterChain;
import javax.servlet.FilterConfig;
import javax.servlet.ServletException;
import javax.servlet.ServletRequest;
import javax.servlet.ServletResponse;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.adempiere.base.sso.ISSOPrincipalService;
import org.adempiere.base.sso.SSOUtils;
import org.compiere.model.MSysConfig;
import org.compiere.util.CLogger;
import org.compiere.util.Util;
/**
* Request filter class for the SSO authentication
*
* @author Logilite Technologies
*/
public class SSOWebUIFilter implements Filter
{
/** Logger */
protected static CLogger log = CLogger.getCLogger(SSOWebUIFilter.class);
/**
* SSOWebUIFilter
*/
public SSOWebUIFilter()
{
super();
} // SSOWebUIFilter
/**
* Filter
*
* @param request request
* @param response response
* @param chain chain
* @throws IOException
* @throws ServletException
*/
public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException
{
boolean isSSOEnable = MSysConfig.getBooleanValue(MSysConfig.ENABLE_SSO, false);
if (isSSOEnable && request instanceof HttpServletRequest)
{
HttpServletRequest httpRequest = (HttpServletRequest) request;
HttpServletResponse httpResponse = (HttpServletResponse) response;
// Ignore the resource request
if (SSOUtils.isResourceRequest(httpRequest, true))
{
chain.doFilter(request, response);
return;
}
boolean isAdminResRequest = false;
if (httpRequest.getSession().getAttribute(ISSOPrincipalService.SSO_ADMIN_LOGIN) != null)
isAdminResRequest = (boolean) httpRequest.getSession().getAttribute(ISSOPrincipalService.SSO_ADMIN_LOGIN);
isAdminResRequest = isAdminResRequest || httpRequest.getServletPath().toLowerCase().startsWith("/admin");
// work as default log in
if (httpRequest.getServletPath().toLowerCase().startsWith("/index") || httpRequest.getServletPath().equalsIgnoreCase("/"))
isAdminResRequest = false;
httpRequest.getSession().setAttribute(ISSOPrincipalService.SSO_ADMIN_LOGIN, isAdminResRequest);
// redirect to admin zul file
if(isAdminResRequest && httpRequest.getServletPath().toLowerCase().endsWith("admin"))
{
httpResponse.sendRedirect("/webui/admin.zul");
return;
}
ISSOPrincipalService m_SSOPrincipal = null;
try
{
m_SSOPrincipal = SSOUtils.getSSOPrincipalService();
if (m_SSOPrincipal != null && !isAdminResRequest)
{
if (m_SSOPrincipal.hasAuthenticationCode(httpRequest, httpResponse))
{
// Use authentication code get get token
String currentUri = httpRequest.getRequestURL().toString();
m_SSOPrincipal.getAuthenticationToken(httpRequest, httpResponse, SSOUtils.SSO_MODE_WEBUI);
// Redirect to default request URL after authentication and handle zoom.
Object zoomPara = httpRequest.getSession().getAttribute(ISSOPrincipalService.SSO_ZOOM_PARAM);
if (zoomPara != null && !Util.isEmpty((String) zoomPara))
currentUri += "?" + (String) zoomPara;
httpResponse.sendRedirect(currentUri);
httpRequest.getSession().removeAttribute(ISSOPrincipalService.SSO_ZOOM_PARAM);
}
else if (!m_SSOPrincipal.isAuthenticated(httpRequest, httpResponse))
{
httpRequest.getSession().setAttribute(ISSOPrincipalService.SSO_ZOOM_PARAM, httpRequest.getQueryString());
// Redirect to SSO sing in page for authentication
m_SSOPrincipal.redirectForAuthentication(httpRequest, httpResponse, SSOUtils.SSO_MODE_WEBUI);
return;
}
}
}
catch (Throwable exc)
{
log.log(Level.SEVERE, "Exception while authenticating: ", exc);
if (m_SSOPrincipal != null)
m_SSOPrincipal.removePrincipalFromSession(httpRequest);
httpResponse.setStatus(500);
response.setContentType("text/html");
response.getWriter().append(SSOUtils.getCreateErrorResponce(exc.getLocalizedMessage()));
return;
}
}
else if (request instanceof HttpServletRequest && ((HttpServletRequest) request).getServletPath().startsWith("/admin"))
{
((HttpServletResponse) response).setStatus(404);
return;
}
chain.doFilter(request, response);
return;
} // doFilter
@Override
public void destroy()
{
}
@Override
public void init(FilterConfig filterConfig) throws ServletException
{
}
} // AdempiereMonitorFilter

View File

@ -0,0 +1,26 @@
package org.adempiere.webui.util;
import org.compiere.util.Env;
import org.compiere.util.Msg;
import org.zkoss.lang.Strings;
import org.zkoss.zk.au.out.AuScript;
import org.zkoss.zk.ui.util.Clients;
public class ZkSSOUtils
{
/**
* Update the error message in error.zul
*
* @param errorMsg
*/
public static void setErrorMessageText(String errorMsg)
{
String continueMsg = Msg.getMsg(Env.getCtx(), "continue").trim();
errorMsg = Msg.getMsg(Env.getCtx(), errorMsg).trim();
errorMsg = Strings.escape(errorMsg, "\"");
String errorScript = "adempiere.set(\"zkErrorMsg\", \"" + errorMsg + "\");";
errorScript += " adempiere.set(\"zkContinueText\", \"" + continueMsg + "\");";
final String scr = errorScript;
Clients.response("ssoErrorScript", new AuScript(null, scr));
}
}

View File

@ -0,0 +1,51 @@
/******************************************************************************
* Copyright (C) 2016 Logilite Technologies LLP *
* This program is free software; you can redistribute it and/or modify it *
* under the terms version 2 of the GNU General Public License as published *
* by the Free Software Foundation. This program is distributed in the hope *
* that it will be useful, but WITHOUT ANY WARRANTY; without even the implied *
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
* See the GNU General Public License for more details. *
* You should have received a copy of the GNU General Public License along *
* with this program; if not, write to the Free Software Foundation, Inc., *
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
*****************************************************************************/
package org.adempiere.webui.window;
import org.adempiere.base.sso.ISSOPrincipalService;
import org.adempiere.webui.component.Window;
import org.zkoss.zk.ui.Executions;
import org.zkoss.zk.ui.event.Event;
import org.zkoss.zk.ui.event.EventListener;
import org.zkoss.zk.ui.event.Events;
/**
* Error window in error.zul
* Remove SSO Principal from session when error.
*
* @author Logilite Technologies
*/
public class ErrorWindow extends Window implements EventListener<Event>
{
/**
*
*/
private static final long serialVersionUID = -1089842665320591389L;
public ErrorWindow()
{
/* If the session token is removed directly then the error page is not load.
* Executions.schedule does not work because request is not alive.
* so echo event to remove token after error page load.
* TODO find a way to use Executions.schedule
*/
addEventListener("onRemoveSSOPrincipal", this);
Events.echoEvent("onRemoveSSOPrincipal", this, null);
}
@Override
public void onEvent(Event event) throws Exception
{
Executions.getCurrent().getSession().removeAttribute(ISSOPrincipalService.SSO_PRINCIPAL_SESSION_TOKEN);
}
}

View File

@ -26,9 +26,13 @@ package org.adempiere.webui.window;
import java.sql.Timestamp;
import java.util.Locale;
import java.util.Properties;
import java.util.logging.Level;
import javax.servlet.http.HttpSession;
import org.adempiere.base.sso.ISSOPrincipalService;
import org.adempiere.base.sso.SSOUtils;
import org.adempiere.exceptions.AdempiereException;
import org.adempiere.util.Callback;
import org.adempiere.webui.AdempiereWebUI;
import org.adempiere.webui.IWebClient;
@ -41,14 +45,19 @@ import org.adempiere.webui.panel.ValidateMFAPanel;
import org.adempiere.webui.session.SessionContextListener;
import org.adempiere.webui.session.SessionManager;
import org.adempiere.webui.theme.ThemeManager;
import org.adempiere.webui.util.UserPreference;
import org.adempiere.webui.util.ZkSSOUtils;
import org.compiere.model.MSysConfig;
import org.compiere.model.MUser;
import org.compiere.util.CLogger;
import org.compiere.util.Env;
import org.compiere.util.KeyNamePair;
import org.compiere.util.Language;
import org.compiere.util.Login;
import org.compiere.util.Msg;
import org.compiere.util.TimeUtil;
import org.compiere.util.Util;
import org.compiere.util.ValueNamePair;
import org.zkoss.util.Locales;
import org.zkoss.web.Attributes;
import org.zkoss.zk.ui.Executions;
@ -74,6 +83,7 @@ public class LoginWindow extends Window implements EventListener<Event>
* generated serial id
*/
private static final long serialVersionUID = 8570332386555237381L;
protected static final CLogger log = CLogger.getCLogger(LoginWindow.class);
protected IWebClient app;
protected Properties ctx;
@ -96,6 +106,7 @@ public class LoginWindow extends Window implements EventListener<Event>
this.ctx = Env.getCtx();
this.app = app;
initComponents();
if (pnlLogin != null)
this.appendChild(pnlLogin);
this.setStyle("background-color: transparent");
// add listener on 'ENTER' key for the login window
@ -108,9 +119,72 @@ public class LoginWindow extends Window implements EventListener<Event>
* Create login panel
*/
private void initComponents()
{
Object token = getDesktop().getSession().getAttribute(ISSOPrincipalService.SSO_PRINCIPAL_SESSION_TOKEN);
if (token == null)
{
createLoginPanel();
}
else
{
ssoLogin(token);
}
}
/**
* Show role panel after SSO authentication.
*
* @param Session token for retrieving user and language.
*/
private void ssoLogin(Object token)
{
String errorMessage = null;
try
{
ISSOPrincipalService ssoPrincipal = SSOUtils.getSSOPrincipalService();
String username = ssoPrincipal.getUserName(token);
Language language = ssoPrincipal.getLanguage(token);
boolean isEmailLogin = MSysConfig.getBooleanValue(MSysConfig.USE_EMAIL_FOR_LOGIN, false);
if (Util.isEmpty(username))
throw new AdempiereException("No Apps " + (isEmailLogin ? "Email" : "User"));
if (language == null)
language = Language.getBaseLanguage();
Env.setContext(ctx, UserPreference.LANGUAGE_NAME, language.getName());
Locale locale = language.getLocale();
getDesktop().getSession().setAttribute(Attributes.PREFERRED_LOCALE, locale);
Login login = new Login(ctx);
boolean isShowRolePanel = MSysConfig.getBooleanValue(MSysConfig.SSO_SELECT_ROLE, true);
// show role panel when change role
if(getDesktop().getSession().hasAttribute(SSOUtils.ISCHANGEROLE_REQUEST))
isShowRolePanel = isShowRolePanel || (boolean) getDesktop().getSession().getAttribute(SSOUtils.ISCHANGEROLE_REQUEST);
KeyNamePair[] clients = login.getClients(username, null, null, token);
if (clients != null)
loginOk(username, isShowRolePanel, clients, true);
else
{
log.log(Level.WARNING,"No Client found for user:" + username);
ValueNamePair error = CLogger.retrieveError();
if (error == null)
error = CLogger.retrieveWarning();
errorMessage = Msg.getMsg(language, error.getValue(), new Object[] { error.getName() });
}
}
catch (Exception e)
{
log.log(Level.SEVERE, e.getMessage(), e);
errorMessage = e.getLocalizedMessage();
}
if (!Util.isEmpty(errorMessage))
{
ZkSSOUtils.setErrorMessageText(errorMessage);
Executions.sendRedirect(SSOUtils.ERROR_VALIDATION_URL);
}
}
/**
* Create login panel
@ -127,14 +201,39 @@ public class LoginWindow extends Window implements EventListener<Event>
*/
public void loginOk(String userName, boolean show, KeyNamePair[] clientsKNPairs)
{
boolean isClientDefined = (clientsKNPairs.length == 1 || ! Util.isEmpty(Env.getContext(ctx, Env.AD_USER_ID)));
loginOk(userName, show, clientsKNPairs, false);
}
public void loginOk(String userName, boolean show, KeyNamePair[] clientsKNPairs, boolean isSSOLogin)
{
boolean isClientDefined = (clientsKNPairs.length == 1 || !Util.isEmpty(Env.getContext(ctx, Env.AD_USER_ID)));
if (pnlRole == null)
pnlRole = new RolePanel(ctx, this, userName, show, clientsKNPairs, isClientDefined);
if (isSSOLogin)
{
this.addEventListener(SSOUtils.EVENT_ON_AFTER_SSOLOGIN, new EventListener<Event>() {
@Override
public void onEvent(Event arg0) throws Exception
{
validateMFPanel(userName, show, clientsKNPairs, isClientDefined);
}
});
Events.echoEvent(SSOUtils.EVENT_ON_AFTER_SSOLOGIN, this, null);
}
else
{
validateMFPanel(userName, show, clientsKNPairs, isClientDefined);
}
}
private void validateMFPanel(String userName, boolean show, KeyNamePair[] clientsKNPairs, boolean isClientDefined)
{
if (isClientDefined) {
createValidateMFAPanel(null, isClientDefined, userName, show, clientsKNPairs);
} else {
showRolePanel(userName, show, clientsKNPairs, isClientDefined, false);
if (! pnlRole.show())
if (!pnlRole.show())
createValidateMFAPanel(null, isClientDefined, userName, show, clientsKNPairs);
}
}

View File

@ -8,6 +8,18 @@
<param-name>org.eclipse.jetty.servlet.SessionCookie</param-name>
<param-value>WEBUI_SESSIONID</param-value>
</context-param>
<filter>
<display-name>SSO WebUI Filter</display-name>
<filter-name>ssowebuifilter</filter-name>
<filter-class>org.adempiere.webui.sso.filter.SSOWebUIFilter</filter-class>
<async-supported>true</async-supported>
</filter>
<filter-mapping>
<filter-name>ssowebuifilter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<servlet>
<servlet-name>AtmosphereServlet</servlet-name>
<servlet-class>org.atmosphere.cpr.AtmosphereServlet</servlet-class>

View File

@ -0,0 +1,49 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright (C) 2007 Ashley G Ramdass.
-->
<?page style="height:100%"?>
<?init zscript="theme.zs" ?>
<?meta http-equiv="X-UA-Compatible" content="IE=edge" ?>
<?meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0" ?>
<?meta name="apple-mobile-web-app-capable" content="yes"?>
<?meta name="mobile-web-app-capable" content="yes"?>
<?link rel="icon" type="image/png" href="${browserIcon}"?>
<?link rel="stylesheet" type="text/css" href="${themeStyleSheet}"?>
<?link rel="stylesheet" type="text/css" href="${themeStyleSheetByBrowser}"?>
<?link rel="stylesheet" type="text/css" href="css/PAPanel.css"?>
<?link rel="manifest" href="manifest.json"?>
<?style content="
.z-grid-header > table > tbody > tr.z-columns > th.z-column.hiddencol > .z-column-content {
white-space: nowrap !important;
text-overflow: unset !important;
}
"?>
<zk>
<script><![CDATA[
if (window.location.protocol == 'https:') {
zk.load("jawwa.atmosphere");
zk.load("org.idempiere.websocket");
zk.load("adempiere.local.storage");
zk.load("html2canvas");
zk.load("org.idempiere.commons");
zk.load("jquery.maskedinput");
zk.load("photobooth");
zk.load("dragdrop.attachment");
zk.afterLoad(function() {
zk._Erbx.push = function(msg) {
if (console) console.log(msg);
};
});
} //window.location.protocol check
else {
alert("Direct http:// is forbidden - please use https:// instead with the SSL port used in your installation");
}
]]>
</script>
<include src="${themePreference}" if="${execution.getScheme() == 'https'}"/>
<window use="org.adempiere.webui.AdempiereWebUI" if="${execution.getScheme() == 'https'}"/>
</zk>

View File

@ -30,7 +30,9 @@ bin.includes = META-INF/,\
lib/ckez.jar,\
lib/daisydiff.jar,\
lib/owasp-java-html-sanitizer.jar,\
.
.,\
error.zul,\
admin.zul
src.includes = WEB-INF/tld/,\
WEB-INF/web.xml,\
WEB-INF/xsd/,\
@ -46,7 +48,8 @@ src.includes = WEB-INF/tld/,\
WEB-INF/src/web/theme/default/zul/calendar/calendar.zul,\
WEB-INF/src/web/theme/default/zul/calendar/calendar_mini.zul,\
WEB-INF/src/web/theme/default/zul/calendar/divarrow.zul,\
WEB-INF/src/web/theme/default/zul/calendar/divtab.zul
WEB-INF/src/web/theme/default/zul/calendar/divtab.zul,\
error.zul
bin.excludes = WEB-INF/src/
source.. = WEB-INF/src/
jre.compilation.profile = JavaSE-17

View File

@ -0,0 +1,45 @@
<?page title="iDempiere" contentType="text/html;charset=UTF-8" automaticTimeout="false" ?>
<?init zscript="theme.zs" ?>
<?link rel="icon" type="image/png" href="${browserIcon}"?>
<zk>
<zscript>
<![CDATA[
import org.compiere.util.Msg;
import org.compiere.util.Env;
import org.adempiere.webui.theme.ThemeManager;
self.setTitle(ThemeManager.getBrowserTitle());
]]>
</zscript>
<script>
<![CDATA[
zk.load("adempiere.local.storage");
]]>
</script>
<window width="60%" mode="highlighted">
<vbox style="padding: 5px">
<window use="org.adempiere.webui.window.ErrorWindow" id="ErrorWindow"/>
<div id="errorText"></div>
<div style="margin-top: 10px">
<toolbarbutton id="continueText" href="/index.zul" label="Continue"/>
</div>
</vbox>
<script defer="true">
<![CDATA[
var callback = function(ok, val) {
if (ok && !!val)
{
document.getElementById("${errorText.uuid}").innerHTML = val;
}
};
var callbackC = function(ok, val) {
if (ok && !!val)
{
document.getElementById("${continueText.uuid}").innerHTML = val;
}
};
adempiere.get("zkErrorMsg", callback);
adempiere.get("zkContinueText", callbackC);
]]>
</script>
</window>
</zk>