Merged HEAD-BUG-FIX (5.0/Cloud) to HEAD (5.0/Cloud)

84811: Merged PLATFORM1 (5.0/Cloud) to HEAD-BUG-FIX (5.0/Cloud)
      82464: ACE-1246 "Allow the customer to change the document encryption key"
      Encrypting content store


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@85170 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Mark Rogers
2014-09-20 08:36:54 +00:00
parent 0620f5019b
commit afe200fbd5
31 changed files with 1162 additions and 231 deletions

View File

@@ -0,0 +1,37 @@
--
-- Title: Create Content Encryption tables
-- Database: PostgreSQL
-- Since: V5.0 Schema 7006
-- Author: Steve Glover
--
-- Please contact support@alfresco.com if you need assistance with the upgrade.
--
CREATE SEQUENCE alf_content_url_enc_seq START WITH 1 INCREMENT BY 1;
CREATE TABLE alf_content_url_encryption
(
id INT8 NOT NULL,
content_url_id INT8 NOT NULL,
algorithm VARCHAR(10) NOT NULL,
key_size INT4 NOT NULL,
encrypted_key BYTEA NOT NULL,
master_keystore_id VARCHAR(20) NOT NULL,
master_key_alias VARCHAR(15) NOT NULL,
unencrypted_file_size INT8 NULL,
CONSTRAINT fk_alf_cont_enc_url FOREIGN KEY (content_url_id) REFERENCES alf_content_url (id) ON DELETE CASCADE,
PRIMARY KEY (id)
);
CREATE UNIQUE INDEX idx_alf_cont_enc_url ON alf_content_url_encryption (content_url_id);
CREATE INDEX idx_alf_cont_enc_mka ON alf_content_url_encryption (master_key_alias);
--
-- Record script finish
--
DELETE FROM alf_applied_patch WHERE id = 'patch.db-V5.0-ContentUrlEncryptionTables';
INSERT INTO alf_applied_patch
(id, description, fixes_from_schema, fixes_to_schema, applied_to_schema, target_schema, applied_on_date, applied_to_server, was_executed, succeeded, report)
VALUES
(
'patch.db-V5.0-ContentUrlEncryptionTables', 'Manually executed script upgrade V5.0: Content Url Encryption Tables',
0, 8001, -1, 8002, null, 'UNKNOWN', ${TRUE}, ${TRUE}, 'Script completed'
);

View File

@@ -25,6 +25,7 @@
<sequence name="alf_child_assoc_seq"/>
<sequence name="alf_content_data_seq"/>
<sequence name="alf_content_url_seq"/>
<sequence name="alf_content_url_enc_seq"/>
<sequence name="alf_encoding_seq"/>
<sequence name="alf_locale_seq"/>
<sequence name="alf_lock_resource_seq"/>
@@ -1183,6 +1184,74 @@
</index>
</indexes>
</table>
<table name="alf_content_url_encryption">
<columns>
<column name="id" order="1">
<type>int8</type>
<nullable>false</nullable>
<autoincrement>false</autoincrement>
</column>
<column name="content_url_id" order="2">
<type>int8</type>
<nullable>false</nullable>
<autoincrement>false</autoincrement>
</column>
<column name="algorithm" order="3">
<type>varchar(10)</type>
<nullable>false</nullable>
<autoincrement>false</autoincrement>
</column>
<column name="key_size" order="4">
<type>int4</type>
<nullable>false</nullable>
<autoincrement>false</autoincrement>
</column>
<column name="encrypted_key" order="5">
<type>bytea</type>
<nullable>false</nullable>
<autoincrement>false</autoincrement>
</column>
<column name="master_keystore_id" order="6">
<type>varchar(20)</type>
<nullable>false</nullable>
<autoincrement>false</autoincrement>
</column>
<column name="master_key_alias" order="7">
<type>varchar(15)</type>
<nullable>false</nullable>
<autoincrement>false</autoincrement>
</column>
<column name="unencrypted_file_size" order="8">
<type>int8</type>
<nullable>true</nullable>
<autoincrement>false</autoincrement>
</column>
</columns>
<primarykey name="alf_content_url_encryption_pkey">
<columnnames>
<columnname order="1">id</columnname>
</columnnames>
</primarykey>
<foreignkeys>
<foreignkey name="fk_alf_cont_enc_url">
<localcolumn>content_url_id</localcolumn>
<targettable>alf_content_url</targettable>
<targetcolumn>id</targetcolumn>
</foreignkey>
</foreignkeys>
<indexes>
<index name="idx_alf_cont_enc_url" unique="true">
<columnnames>
<columnname>content_url_id</columnname>
</columnnames>
</index>
<index name="idx_alf_cont_enc_mka" unique="false">
<columnnames>
<columnname>master_key_alias</columnname>
</columnnames>
</index>
</indexes>
</table>
<table name="alf_encoding">
<columns>
<column name="id" order="1">