2nd draft
This commit is contained in:
parent
a47e96619e
commit
e7ed89da58
|
@ -0,0 +1,108 @@
|
|||
<?xml version="1.0" encoding="UTF-16" ?>
|
||||
<!-- Configuration File (1.1.0.0). -->
|
||||
<!-- This file contains the XML strcuture which should be passed
|
||||
to the IFSHelperInitialize API to initialize the Library -->
|
||||
|
||||
<fs-helper-ps-config>
|
||||
<ps-details>
|
||||
<!-- URLs of the Policy Server. -->
|
||||
<urls>
|
||||
<!--
|
||||
URL of the Policy Server. Multiple such tags can be present.
|
||||
It is recommended to put reachable URL as first URL and then
|
||||
backup URL.
|
||||
-->
|
||||
<url>
|
||||
<!--
|
||||
Parts of URL.
|
||||
For example, if URL is https://demo.seclore.com:9443/PolicyServer,
|
||||
server: demo.seclore.com
|
||||
port: 9443
|
||||
app-name: PolicyServer.
|
||||
|
||||
Value of 'port' is mandatory.
|
||||
-->
|
||||
<server></server>
|
||||
<port></port>
|
||||
<app-name></app-name>
|
||||
</url>
|
||||
</urls>
|
||||
</ps-details>
|
||||
|
||||
<!-- Login details for this instance -->
|
||||
<login-details>
|
||||
<!--
|
||||
Login user type.
|
||||
1: Cabinet User
|
||||
2: PS End-User
|
||||
-->
|
||||
<user-type>1</user-type>
|
||||
|
||||
<!-- Structure for user type Cabinet User(1) -->
|
||||
<!--
|
||||
Hot Folder Cabinet details. This details are used to authenticate with
|
||||
Policy Server.
|
||||
-->
|
||||
<hotfolder-cabinet>
|
||||
<!--
|
||||
Hot Folder Cabinet identifier.
|
||||
-->
|
||||
<id></id>
|
||||
<!--
|
||||
Hot Folder Cabinet pass phrase.
|
||||
-->
|
||||
<passphrase></passphrase>
|
||||
|
||||
<!--
|
||||
Flag to enable advance priviledges
|
||||
-->
|
||||
<allow-advanced-privileges>false</allow-advanced-privileges>
|
||||
</hotfolder-cabinet>
|
||||
|
||||
</login-details>
|
||||
|
||||
<!-- This tag defines whether inline attachment should be embedded in unprotected mail body or should be provided separately
|
||||
true : Inline attachments will get embedded in mail body.
|
||||
false : Inline attachments will be provided separately and not as mail body content.
|
||||
-->
|
||||
<include-inline-attachment-in-mail-body>false</include-inline-attachment-in-mail-body>
|
||||
|
||||
<!--
|
||||
The Locale of FSHelper.
|
||||
Locale String Format : <language code>[_<country code>[_<variant code>]]
|
||||
-->
|
||||
<locale>en</locale>
|
||||
|
||||
<!--
|
||||
Policy Server session pool configuration.
|
||||
-->
|
||||
<session-pool>
|
||||
<!--
|
||||
Max. number of connection with Policy Server. This value is based on
|
||||
(equal to) active concurrent users of Integrating Application deployment.
|
||||
-->
|
||||
<max-size>50</max-size>
|
||||
<!--
|
||||
Policy Server session timeout in seconds. This is typically 15 minutes (900 seconds).
|
||||
for Policy Server. Value of this tag can be found in configuration file
|
||||
of Web Application Server (web.xml for Tomcat).
|
||||
-->
|
||||
<default-session-timeout>900</default-session-timeout>
|
||||
</session-pool>
|
||||
|
||||
<!--
|
||||
Details of proxy server, if required to connect to Policy Server.
|
||||
If not required, remove the following tag itself. It is optional.
|
||||
-->
|
||||
<proxy-details>
|
||||
<server></server>
|
||||
<port></port>
|
||||
<user></user>
|
||||
<password></password>
|
||||
<!--
|
||||
Semicolon (;) separated list of URL patterns, just like IE bypass
|
||||
list in Internet Explorer.
|
||||
-->
|
||||
<bypass-list></bypass-list>
|
||||
</proxy-details>
|
||||
</fs-helper-ps-config>
|
|
@ -0,0 +1,25 @@
|
|||
<?xml version="1.0" encoding="UTF-16" ?>
|
||||
<!-- Configuration File (1.0.1.0). -->
|
||||
<!-- This file contains the XML strcuture which should be passed
|
||||
to the IFSHelperInitialize API to initialize the Library -->
|
||||
|
||||
<fs-helper-config>
|
||||
<!-- Locale being used in the application. Currently, this tag is ignored. -->
|
||||
<locale/>
|
||||
<!-- Application Path -->
|
||||
<app-path></app-path>
|
||||
<!-- Whether the FSHelper Library need to initialize the loggers.
|
||||
true - FSHelper Library will initialize the logger
|
||||
false - calling application has already initialized the logger.
|
||||
-->
|
||||
<initalize-logger>true</initalize-logger>
|
||||
<!-- Whether enforce BC-FIPS as security provider.
|
||||
true - Enforce BC-FIPS as security provider.
|
||||
false - Use default security provider (Java security provider).
|
||||
-->
|
||||
<enforce-fips>false</enforce-fips>
|
||||
|
||||
<!-- Provide the integrating app name -->
|
||||
<integrated-app-name></integrated-app-name>
|
||||
|
||||
</fs-helper-config>
|
|
@ -0,0 +1,125 @@
|
|||
<?xml version="1.0" encoding="UTF-16" ?>
|
||||
<!-- Configuration File (1.1.0.0). -->
|
||||
<!-- This file contains the XML strcuture which should be passed
|
||||
to the IFSHelperInitialize API to initialize the Library -->
|
||||
|
||||
<fs-helper-ps-config>
|
||||
<ps-details>
|
||||
<!-- URLs of the Policy Server. -->
|
||||
<urls>
|
||||
<!--
|
||||
URL of the Policy Server. Multiple such tags can be present.
|
||||
It is recommended to put reachable URL as first URL and then
|
||||
backup URL.
|
||||
-->
|
||||
<url>
|
||||
<!--
|
||||
Parts of URL.
|
||||
For example, if URL is https://demo.seclore.com:9443/PolicyServer,
|
||||
server: demo.seclore.com
|
||||
port: 9443
|
||||
app-name: PolicyServer.
|
||||
|
||||
Value of 'port' is mandatory.
|
||||
-->
|
||||
<server></server>
|
||||
<port></port>
|
||||
<app-name></app-name>
|
||||
</url>
|
||||
</urls>
|
||||
</ps-details>
|
||||
|
||||
<!-- Login details for this instance -->
|
||||
<login-details>
|
||||
<!--
|
||||
Login user type.
|
||||
1: Cabinet User
|
||||
2: PS End-User
|
||||
-->
|
||||
<user-type>2</user-type>
|
||||
|
||||
<!-- Structure for user type PS End User(2) -->
|
||||
<!--
|
||||
End User details. This details are used to authenticate with
|
||||
Policy Server.
|
||||
-->
|
||||
<end-user>
|
||||
<!--
|
||||
Repository details.
|
||||
-->
|
||||
<repository>
|
||||
<!--
|
||||
Repository code
|
||||
-->
|
||||
<rep-code></rep-code>
|
||||
</repository>
|
||||
<!--
|
||||
Authentication details.
|
||||
-->
|
||||
<auth-details>
|
||||
<!-- For Active Directory authentication, following is the sample XML of params.-->
|
||||
<params>
|
||||
<param>
|
||||
<name>login-id</name>
|
||||
<value></value>
|
||||
</param>
|
||||
<param>
|
||||
<name>password</name>
|
||||
<value></value>
|
||||
</param>
|
||||
<param>
|
||||
<name>domain</name>
|
||||
<value></value>
|
||||
</param>
|
||||
</params>
|
||||
|
||||
</auth-details>
|
||||
</end-user>
|
||||
|
||||
</login-details>
|
||||
|
||||
<!-- This tag defines whether inline attachment should be embedded in unprotected mail body or should be provided separately
|
||||
true : Inline attachments will get embedded in mail body.
|
||||
false : Inline attachments will be provided separately and not as mail body content.
|
||||
-->
|
||||
<include-inline-attachment-in-mail-body>false</include-inline-attachment-in-mail-body>
|
||||
|
||||
<!--
|
||||
The Locale of FSHelper.
|
||||
Locale String Format : <language code>[_<country code>[_<variant code>]]
|
||||
-->
|
||||
<locale>en</locale>
|
||||
|
||||
<!--
|
||||
Policy Server session pool configuration.
|
||||
-->
|
||||
<session-pool>
|
||||
<!--
|
||||
Max. number of connection with Policy Server. This value is based on
|
||||
(equal to) active concurrent users of Integrating Application deployment.
|
||||
-->
|
||||
<max-size>50</max-size>
|
||||
<!--
|
||||
Policy Server session timeout in seconds. This is typically 15 minutes (900 seconds).
|
||||
for Policy Server. Value of this tag can be found in configuration file
|
||||
of Web Application Server (web.xml for Tomcat).
|
||||
-->
|
||||
<default-session-timeout>900</default-session-timeout>
|
||||
</session-pool>
|
||||
|
||||
<!--
|
||||
Details of proxy server, if required to connect to Policy Server.
|
||||
If not required, remove the following tag itself. It is optional.
|
||||
-->
|
||||
<proxy-details>
|
||||
<server></server>
|
||||
<port></port>
|
||||
<user></user>
|
||||
<password></password>
|
||||
<!--
|
||||
Semicolon (;) separated list of URL patterns, just like IE bypass
|
||||
list in Internet Explorer.
|
||||
-->
|
||||
<bypass-list></bypass-list>
|
||||
</proxy-details>
|
||||
</fs-helper-ps-config>
|
|
@ -0,0 +1,43 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<Configuration status="info" >
|
||||
|
||||
<Properties>
|
||||
<Property name="basePath">${ctx:applicationPath}/logs</Property>
|
||||
</Properties>
|
||||
|
||||
<Loggers>
|
||||
<Asynclogger name="WSCLIENT" level="info" additivity="false" >
|
||||
<appender-ref ref="WSCLIENT_APPENDER" />
|
||||
</Asynclogger>
|
||||
</Loggers>
|
||||
|
||||
<Appenders>
|
||||
|
||||
<RollingRandomAccessFile name="WSCLIENT_APPENDER" fileName="${basePath}/WSClient.log" filePattern="${basePath}/WSClient_%d{yyyy-MM-dd}_%i.log.zip">
|
||||
<PatternLayout>
|
||||
<charset>UTF-8</charset>
|
||||
<pattern>%d{MMM dd, yyyy HH:mm:ss.SSS}: %t: %p: %m%n</pattern>
|
||||
</PatternLayout>
|
||||
<Policies>
|
||||
<TimeBasedTriggeringPolicy interval="1" modulate="true" />
|
||||
<SizeBasedTriggeringPolicy size="10MB"/>
|
||||
</Policies>
|
||||
<DefaultRolloverStrategy fileIndex="nomax">
|
||||
<!--
|
||||
* Uncommenting the following code will enable deletion of log files of above name and
|
||||
* which are older than 90 days(configurable only days accepted)
|
||||
* Be careful! There is no way to recover files deleted this way.
|
||||
-->
|
||||
<!--
|
||||
<Delete basePath="${basePath}" >
|
||||
<IfFileName glob="PolicyServer_*.log.zip" />
|
||||
<IfLastModified age="90d" />
|
||||
</Delete>
|
||||
-->
|
||||
</DefaultRolloverStrategy>
|
||||
</RollingRandomAccessFile>
|
||||
|
||||
</Appenders>
|
||||
|
||||
</Configuration>
|
Binary file not shown.
|
@ -0,0 +1,597 @@
|
|||
THIRD-PARTY OPEN SOURCE SOFTWARE NOTICES AND INFORMATION
|
||||
Do Not Translate or Localize
|
||||
|
||||
Seclore Server SDK Java incorporates third party material from the opensource
|
||||
projects listed below. The original copyright notice and the license under
|
||||
which Seclore received such third party material are set forth below. Seclore
|
||||
reserves all other rights not expressly granted, whether by implication,
|
||||
estoppel or otherwise. Such licenses and notices are provided for
|
||||
informational purposes only.
|
||||
|
||||
|
||||
All files or libraries mentioned below are externally maintained libraries
|
||||
used by this software which have their own licenses;
|
||||
we recommend you read them, as their terms may differ from the Seclore
|
||||
commercial terms.
|
||||
|
||||
|
||||
List includes open source third party libraries used by Seclore Policy Server
|
||||
For more details on Free and Open Source Software (FOSS) libraries used visit
|
||||
project home or check notices and licenses shipped with binaries of these
|
||||
libraries.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
List of open source libraries:
|
||||
1. BouncyCastle Crypto Library Java 1.0.2.4
|
||||
2. Apache Logging for Java 2.17.1
|
||||
3. Apache Commons
|
||||
4. xerces XML Parser 2.12.2
|
||||
|
||||
|
||||
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
|
||||
|
||||
1. BouncyCastle Crypto Library Java 1.0.2.4
|
||||
|
||||
https://www.bouncycastle.org/fips-java/
|
||||
|
||||
MIT
|
||||
|
||||
|
||||
|
||||
--- begin of LICENSE ---
|
||||
|
||||
|
||||
|
||||
Copyright (c) 2000-2021 The Legion of the Bouncy Castle Inc. (http://www.bouncycastle.org)
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software
|
||||
and associated documentation files (the "Software"), to deal in the Software without restriction,
|
||||
including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
|
||||
subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all copies or substantial
|
||||
portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
|
||||
INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
|
||||
PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
|
||||
OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
DEALINGS IN THE SOFTWARE.
|
||||
|
||||
|
||||
|
||||
|
||||
--- end of LICENSE ---
|
||||
|
||||
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
|
||||
|
||||
2. Apache Logging for Java 2.17.1
|
||||
|
||||
https://logging.apache.org/log4j/2.0/download.html
|
||||
https://github.com/apache/logging-log4j2/tree/rel/2.17.1
|
||||
|
||||
Apache 2.0
|
||||
|
||||
|
||||
|
||||
--- begin of LICENSE ---
|
||||
|
||||
|
||||
Apache License
|
||||
Version 2.0, January 2004
|
||||
http://www.apache.org/licenses/
|
||||
|
||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||
|
||||
1. Definitions.
|
||||
|
||||
"License" shall mean the terms and conditions for use, reproduction,
|
||||
and distribution as defined by Sections 1 through 9 of this document.
|
||||
|
||||
"Licensor" shall mean the copyright owner or entity authorized by
|
||||
the copyright owner that is granting the License.
|
||||
|
||||
"Legal Entity" shall mean the union of the acting entity and all
|
||||
other entities that control, are controlled by, or are under common
|
||||
control with that entity. For the purposes of this definition,
|
||||
"control" means (i) the power, direct or indirect, to cause the
|
||||
direction or management of such entity, whether by contract or
|
||||
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
||||
outstanding shares, or (iii) beneficial ownership of such entity.
|
||||
|
||||
"You" (or "Your") shall mean an individual or Legal Entity
|
||||
exercising permissions granted by this License.
|
||||
|
||||
"Source" form shall mean the preferred form for making modifications,
|
||||
including but not limited to software source code, documentation
|
||||
source, and configuration files.
|
||||
|
||||
"Object" form shall mean any form resulting from mechanical
|
||||
transformation or translation of a Source form, including but
|
||||
not limited to compiled object code, generated documentation,
|
||||
and conversions to other media types.
|
||||
|
||||
"Work" shall mean the work of authorship, whether in Source or
|
||||
Object form, made available under the License, as indicated by a
|
||||
copyright notice that is included in or attached to the work
|
||||
(an example is provided in the Appendix below).
|
||||
|
||||
"Derivative Works" shall mean any work, whether in Source or Object
|
||||
form, that is based on (or derived from) the Work and for which the
|
||||
editorial revisions, annotations, elaborations, or other modifications
|
||||
represent, as a whole, an original work of authorship. For the purposes
|
||||
of this License, Derivative Works shall not include works that remain
|
||||
separable from, or merely link (or bind by name) to the interfaces of,
|
||||
the Work and Derivative Works thereof.
|
||||
|
||||
"Contribution" shall mean any work of authorship, including
|
||||
the original version of the Work and any modifications or additions
|
||||
to that Work or Derivative Works thereof, that is intentionally
|
||||
submitted to Licensor for inclusion in the Work by the copyright owner
|
||||
or by an individual or Legal Entity authorized to submit on behalf of
|
||||
the copyright owner. For the purposes of this definition, "submitted"
|
||||
means any form of electronic, verbal, or written communication sent
|
||||
to the Licensor or its representatives, including but not limited to
|
||||
communication on electronic mailing lists, source code control systems,
|
||||
and issue tracking systems that are managed by, or on behalf of, the
|
||||
Licensor for the purpose of discussing and improving the Work, but
|
||||
excluding communication that is conspicuously marked or otherwise
|
||||
designated in writing by the copyright owner as "Not a Contribution."
|
||||
|
||||
"Contributor" shall mean Licensor and any individual or Legal Entity
|
||||
on behalf of whom a Contribution has been received by Licensor and
|
||||
subsequently incorporated within the Work.
|
||||
|
||||
2. Grant of Copyright License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
copyright license to reproduce, prepare Derivative Works of,
|
||||
publicly display, publicly perform, sublicense, and distribute the
|
||||
Work and such Derivative Works in Source or Object form.
|
||||
|
||||
3. Grant of Patent License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
(except as stated in this section) patent license to make, have made,
|
||||
use, offer to sell, sell, import, and otherwise transfer the Work,
|
||||
where such license applies only to those patent claims licensable
|
||||
by such Contributor that are necessarily infringed by their
|
||||
Contribution(s) alone or by combination of their Contribution(s)
|
||||
with the Work to which such Contribution(s) was submitted. If You
|
||||
institute patent litigation against any entity (including a
|
||||
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
||||
or a Contribution incorporated within the Work constitutes direct
|
||||
or contributory patent infringement, then any patent licenses
|
||||
granted to You under this License for that Work shall terminate
|
||||
as of the date such litigation is filed.
|
||||
|
||||
4. Redistribution. You may reproduce and distribute copies of the
|
||||
Work or Derivative Works thereof in any medium, with or without
|
||||
modifications, and in Source or Object form, provided that You
|
||||
meet the following conditions:
|
||||
|
||||
(a) You must give any other recipients of the Work or
|
||||
Derivative Works a copy of this License; and
|
||||
|
||||
(b) You must cause any modified files to carry prominent notices
|
||||
stating that You changed the files; and
|
||||
|
||||
(c) You must retain, in the Source form of any Derivative Works
|
||||
that You distribute, all copyright, patent, trademark, and
|
||||
attribution notices from the Source form of the Work,
|
||||
excluding those notices that do not pertain to any part of
|
||||
the Derivative Works; and
|
||||
|
||||
(d) If the Work includes a "NOTICE" text file as part of its
|
||||
distribution, then any Derivative Works that You distribute must
|
||||
include a readable copy of the attribution notices contained
|
||||
within such NOTICE file, excluding those notices that do not
|
||||
pertain to any part of the Derivative Works, in at least one
|
||||
of the following places: within a NOTICE text file distributed
|
||||
as part of the Derivative Works; within the Source form or
|
||||
documentation, if provided along with the Derivative Works; or,
|
||||
within a display generated by the Derivative Works, if and
|
||||
wherever such third-party notices normally appear. The contents
|
||||
of the NOTICE file are for informational purposes only and
|
||||
do not modify the License. You may add Your own attribution
|
||||
notices within Derivative Works that You distribute, alongside
|
||||
or as an addendum to the NOTICE text from the Work, provided
|
||||
that such additional attribution notices cannot be construed
|
||||
as modifying the License.
|
||||
|
||||
You may add Your own copyright statement to Your modifications and
|
||||
may provide additional or different license terms and conditions
|
||||
for use, reproduction, or distribution of Your modifications, or
|
||||
for any such Derivative Works as a whole, provided Your use,
|
||||
reproduction, and distribution of the Work otherwise complies with
|
||||
the conditions stated in this License.
|
||||
|
||||
5. Submission of Contributions. Unless You explicitly state otherwise,
|
||||
any Contribution intentionally submitted for inclusion in the Work
|
||||
by You to the Licensor shall be under the terms and conditions of
|
||||
this License, without any additional terms or conditions.
|
||||
Notwithstanding the above, nothing herein shall supersede or modify
|
||||
the terms of any separate license agreement you may have executed
|
||||
with Licensor regarding such Contributions.
|
||||
|
||||
6. Trademarks. This License does not grant permission to use the trade
|
||||
names, trademarks, service marks, or product names of the Licensor,
|
||||
except as required for reasonable and customary use in describing the
|
||||
origin of the Work and reproducing the content of the NOTICE file.
|
||||
|
||||
7. Disclaimer of Warranty. Unless required by applicable law or
|
||||
agreed to in writing, Licensor provides the Work (and each
|
||||
Contributor provides its Contributions) on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||
implied, including, without limitation, any warranties or conditions
|
||||
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
||||
PARTICULAR PURPOSE. You are solely responsible for determining the
|
||||
appropriateness of using or redistributing the Work and assume any
|
||||
risks associated with Your exercise of permissions under this License.
|
||||
|
||||
8. Limitation of Liability. In no event and under no legal theory,
|
||||
whether in tort (including negligence), contract, or otherwise,
|
||||
unless required by applicable law (such as deliberate and grossly
|
||||
negligent acts) or agreed to in writing, shall any Contributor be
|
||||
liable to You for damages, including any direct, indirect, special,
|
||||
incidental, or consequential damages of any character arising as a
|
||||
result of this License or out of the use or inability to use the
|
||||
Work (including but not limited to damages for loss of goodwill,
|
||||
work stoppage, computer failure or malfunction, or any and all
|
||||
other commercial damages or losses), even if such Contributor
|
||||
has been advised of the possibility of such damages.
|
||||
|
||||
9. Accepting Warranty or Additional Liability. While redistributing
|
||||
the Work or Derivative Works thereof, You may choose to offer,
|
||||
and charge a fee for, acceptance of support, warranty, indemnity,
|
||||
or other liability obligations and/or rights consistent with this
|
||||
License. However, in accepting such obligations, You may act only
|
||||
on Your own behalf and on Your sole responsibility, not on behalf
|
||||
of any other Contributor, and only if You agree to indemnify,
|
||||
defend, and hold each Contributor harmless for any liability
|
||||
incurred by, or claims asserted against, such Contributor by reason
|
||||
of your accepting any such warranty or additional liability.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
APPENDIX: How to apply the Apache License to your work.
|
||||
|
||||
To apply the Apache License to your work, attach the following
|
||||
boilerplate notice, with the fields enclosed by brackets "[]"
|
||||
replaced with your own identifying information. (Don't include
|
||||
the brackets!) The text should be enclosed in the appropriate
|
||||
comment syntax for the file format. We also recommend that a
|
||||
file or class name and description of purpose be included on the
|
||||
same "printed page" as the copyright notice for easier
|
||||
identification within third-party archives.
|
||||
|
||||
Copyright [yyyy] [name of copyright owner]
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
|
||||
|
||||
|
||||
|
||||
--- end of LICENSE ---
|
||||
|
||||
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
|
||||
|
||||
3. Apache Commons
|
||||
|
||||
http://commons.apache.org/
|
||||
|
||||
Apache 2.0
|
||||
|
||||
|
||||
|
||||
--- begin of LICENSE ---
|
||||
|
||||
Apache License
|
||||
|
||||
Version 2.0, January 2004
|
||||
|
||||
http://www.apache.org/licenses/
|
||||
|
||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||
|
||||
1. Definitions.
|
||||
|
||||
"License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document.
|
||||
|
||||
"Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License.
|
||||
|
||||
"Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity.
|
||||
|
||||
"You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License.
|
||||
|
||||
"Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files.
|
||||
|
||||
"Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types.
|
||||
|
||||
"Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below).
|
||||
|
||||
"Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof.
|
||||
|
||||
"Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution."
|
||||
|
||||
"Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work.
|
||||
|
||||
2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form.
|
||||
|
||||
3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed.
|
||||
|
||||
4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions:
|
||||
|
||||
You must give any other recipients of the Work or Derivative Works a copy of this License; and
|
||||
You must cause any modified files to carry prominent notices stating that You changed the files; and
|
||||
You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and
|
||||
If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License.
|
||||
|
||||
You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License.
|
||||
5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions.
|
||||
|
||||
6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file.
|
||||
|
||||
7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License.
|
||||
|
||||
8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages.
|
||||
|
||||
9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
|
||||
|
||||
--- end of LICENSE ---
|
||||
|
||||
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
|
||||
|
||||
4. xerces XML Parser 2.12.2
|
||||
|
||||
https://github.com/apache/xerces2-j
|
||||
|
||||
Apache 2.0
|
||||
|
||||
|
||||
|
||||
--- begin of LICENSE ---
|
||||
|
||||
|
||||
Apache License
|
||||
Version 2.0, January 2004
|
||||
http://www.apache.org/licenses/
|
||||
|
||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||
|
||||
1. Definitions.
|
||||
|
||||
"License" shall mean the terms and conditions for use, reproduction,
|
||||
and distribution as defined by Sections 1 through 9 of this document.
|
||||
|
||||
"Licensor" shall mean the copyright owner or entity authorized by
|
||||
the copyright owner that is granting the License.
|
||||
|
||||
"Legal Entity" shall mean the union of the acting entity and all
|
||||
other entities that control, are controlled by, or are under common
|
||||
control with that entity. For the purposes of this definition,
|
||||
"control" means (i) the power, direct or indirect, to cause the
|
||||
direction or management of such entity, whether by contract or
|
||||
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
||||
outstanding shares, or (iii) beneficial ownership of such entity.
|
||||
|
||||
"You" (or "Your") shall mean an individual or Legal Entity
|
||||
exercising permissions granted by this License.
|
||||
|
||||
"Source" form shall mean the preferred form for making modifications,
|
||||
including but not limited to software source code, documentation
|
||||
source, and configuration files.
|
||||
|
||||
"Object" form shall mean any form resulting from mechanical
|
||||
transformation or translation of a Source form, including but
|
||||
not limited to compiled object code, generated documentation,
|
||||
and conversions to other media types.
|
||||
|
||||
"Work" shall mean the work of authorship, whether in Source or
|
||||
Object form, made available under the License, as indicated by a
|
||||
copyright notice that is included in or attached to the work
|
||||
(an example is provided in the Appendix below).
|
||||
|
||||
"Derivative Works" shall mean any work, whether in Source or Object
|
||||
form, that is based on (or derived from) the Work and for which the
|
||||
editorial revisions, annotations, elaborations, or other modifications
|
||||
represent, as a whole, an original work of authorship. For the purposes
|
||||
of this License, Derivative Works shall not include works that remain
|
||||
separable from, or merely link (or bind by name) to the interfaces of,
|
||||
the Work and Derivative Works thereof.
|
||||
|
||||
"Contribution" shall mean any work of authorship, including
|
||||
the original version of the Work and any modifications or additions
|
||||
to that Work or Derivative Works thereof, that is intentionally
|
||||
submitted to Licensor for inclusion in the Work by the copyright owner
|
||||
or by an individual or Legal Entity authorized to submit on behalf of
|
||||
the copyright owner. For the purposes of this definition, "submitted"
|
||||
means any form of electronic, verbal, or written communication sent
|
||||
to the Licensor or its representatives, including but not limited to
|
||||
communication on electronic mailing lists, source code control systems,
|
||||
and issue tracking systems that are managed by, or on behalf of, the
|
||||
Licensor for the purpose of discussing and improving the Work, but
|
||||
excluding communication that is conspicuously marked or otherwise
|
||||
designated in writing by the copyright owner as "Not a Contribution."
|
||||
|
||||
"Contributor" shall mean Licensor and any individual or Legal Entity
|
||||
on behalf of whom a Contribution has been received by Licensor and
|
||||
subsequently incorporated within the Work.
|
||||
|
||||
2. Grant of Copyright License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
copyright license to reproduce, prepare Derivative Works of,
|
||||
publicly display, publicly perform, sublicense, and distribute the
|
||||
Work and such Derivative Works in Source or Object form.
|
||||
|
||||
3. Grant of Patent License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
(except as stated in this section) patent license to make, have made,
|
||||
use, offer to sell, sell, import, and otherwise transfer the Work,
|
||||
where such license applies only to those patent claims licensable
|
||||
by such Contributor that are necessarily infringed by their
|
||||
Contribution(s) alone or by combination of their Contribution(s)
|
||||
with the Work to which such Contribution(s) was submitted. If You
|
||||
institute patent litigation against any entity (including a
|
||||
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
||||
or a Contribution incorporated within the Work constitutes direct
|
||||
or contributory patent infringement, then any patent licenses
|
||||
granted to You under this License for that Work shall terminate
|
||||
as of the date such litigation is filed.
|
||||
|
||||
4. Redistribution. You may reproduce and distribute copies of the
|
||||
Work or Derivative Works thereof in any medium, with or without
|
||||
modifications, and in Source or Object form, provided that You
|
||||
meet the following conditions:
|
||||
|
||||
(a) You must give any other recipients of the Work or
|
||||
Derivative Works a copy of this License; and
|
||||
|
||||
(b) You must cause any modified files to carry prominent notices
|
||||
stating that You changed the files; and
|
||||
|
||||
(c) You must retain, in the Source form of any Derivative Works
|
||||
that You distribute, all copyright, patent, trademark, and
|
||||
attribution notices from the Source form of the Work,
|
||||
excluding those notices that do not pertain to any part of
|
||||
the Derivative Works; and
|
||||
|
||||
(d) If the Work includes a "NOTICE" text file as part of its
|
||||
distribution, then any Derivative Works that You distribute must
|
||||
include a readable copy of the attribution notices contained
|
||||
within such NOTICE file, excluding those notices that do not
|
||||
pertain to any part of the Derivative Works, in at least one
|
||||
of the following places: within a NOTICE text file distributed
|
||||
as part of the Derivative Works; within the Source form or
|
||||
documentation, if provided along with the Derivative Works; or,
|
||||
within a display generated by the Derivative Works, if and
|
||||
wherever such third-party notices normally appear. The contents
|
||||
of the NOTICE file are for informational purposes only and
|
||||
do not modify the License. You may add Your own attribution
|
||||
notices within Derivative Works that You distribute, alongside
|
||||
or as an addendum to the NOTICE text from the Work, provided
|
||||
that such additional attribution notices cannot be construed
|
||||
as modifying the License.
|
||||
|
||||
You may add Your own copyright statement to Your modifications and
|
||||
may provide additional or different license terms and conditions
|
||||
for use, reproduction, or distribution of Your modifications, or
|
||||
for any such Derivative Works as a whole, provided Your use,
|
||||
reproduction, and distribution of the Work otherwise complies with
|
||||
the conditions stated in this License.
|
||||
|
||||
5. Submission of Contributions. Unless You explicitly state otherwise,
|
||||
any Contribution intentionally submitted for inclusion in the Work
|
||||
by You to the Licensor shall be under the terms and conditions of
|
||||
this License, without any additional terms or conditions.
|
||||
Notwithstanding the above, nothing herein shall supersede or modify
|
||||
the terms of any separate license agreement you may have executed
|
||||
with Licensor regarding such Contributions.
|
||||
|
||||
6. Trademarks. This License does not grant permission to use the trade
|
||||
names, trademarks, service marks, or product names of the Licensor,
|
||||
except as required for reasonable and customary use in describing the
|
||||
origin of the Work and reproducing the content of the NOTICE file.
|
||||
|
||||
7. Disclaimer of Warranty. Unless required by applicable law or
|
||||
agreed to in writing, Licensor provides the Work (and each
|
||||
Contributor provides its Contributions) on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||
implied, including, without limitation, any warranties or conditions
|
||||
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
||||
PARTICULAR PURPOSE. You are solely responsible for determining the
|
||||
appropriateness of using or redistributing the Work and assume any
|
||||
risks associated with Your exercise of permissions under this License.
|
||||
|
||||
8. Limitation of Liability. In no event and under no legal theory,
|
||||
whether in tort (including negligence), contract, or otherwise,
|
||||
unless required by applicable law (such as deliberate and grossly
|
||||
negligent acts) or agreed to in writing, shall any Contributor be
|
||||
liable to You for damages, including any direct, indirect, special,
|
||||
incidental, or consequential damages of any character arising as a
|
||||
result of this License or out of the use or inability to use the
|
||||
Work (including but not limited to damages for loss of goodwill,
|
||||
work stoppage, computer failure or malfunction, or any and all
|
||||
other commercial damages or losses), even if such Contributor
|
||||
has been advised of the possibility of such damages.
|
||||
|
||||
9. Accepting Warranty or Additional Liability. While redistributing
|
||||
the Work or Derivative Works thereof, You may choose to offer,
|
||||
and charge a fee for, acceptance of support, warranty, indemnity,
|
||||
or other liability obligations and/or rights consistent with this
|
||||
License. However, in accepting such obligations, You may act only
|
||||
on Your own behalf and on Your sole responsibility, not on behalf
|
||||
of any other Contributor, and only if You agree to indemnify,
|
||||
defend, and hold each Contributor harmless for any liability
|
||||
incurred by, or claims asserted against, such Contributor by reason
|
||||
of your accepting any such warranty or additional liability.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
APPENDIX: How to apply the Apache License to your work.
|
||||
|
||||
To apply the Apache License to your work, attach the following
|
||||
boilerplate notice, with the fields enclosed by brackets "[]"
|
||||
replaced with your own identifying information. (Don't include
|
||||
the brackets!) The text should be enclosed in the appropriate
|
||||
comment syntax for the file format. We also recommend that a
|
||||
file or class name and description of purpose be included on the
|
||||
same "printed page" as the copyright notice for easier
|
||||
identification within third-party archives.
|
||||
|
||||
Copyright [yyyy] [name of copyright owner]
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
|
||||
|
||||
|
||||
--- end of LICENSE ---
|
||||
|
||||
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
|
||||
|
17
README.md
17
README.md
|
@ -1,12 +1,10 @@
|
|||
<div style="text-align: center;"><img alt="Seclore Server SDK" width="1412" src="resources/seclore-logo-banner.jpg">
|
||||
<p align="center" >
|
||||
<a href="<link to developer site>"> <img alt="Website" src="https://img.shields.io/badge/Developer_Docs-online-blue"></a>
|
||||
</p>
|
||||
<div style="text-align: center;">
|
||||
<img alt="Seclore Server SDK" width="1412" src="resources/seclore-logo-banner.jpg">
|
||||
</div>
|
||||
|
||||
# Seclore Server SDK Examples
|
||||
|
||||
Welcome to the Seclore Server SDK Examples repository! Here, you'll find a curated collection of example projects showcasing the robust capabilities of the [Seclore Software Development Kit](https://repo.seclore.com/public/-/packages/generic/seclore-java-sdk/4.4.16.0).
|
||||
Welcome to the Seclore Server SDK Examples repository! Here, you'll find a curated collection of example projects showcasing the robust capabilities of the [Seclore Software Development Kit](https://repo.seclore.com/public/-/packages/generic/seclore-java-sdk/test).
|
||||
|
||||
## Table of Contents
|
||||
|
||||
|
@ -20,7 +18,7 @@ This repository serves as a comprehensive guide to leveraging the powerful Web S
|
|||
|
||||
## Examples <a name="Examples"></a>
|
||||
|
||||
Refer the examples in Java language, fully supported by the Seclore Server SDK. Explore the intricacies of secure data management, access controls, and much more by visiting the following link: [Examples](https://repo.seclore.com/public/seclore-java-sdk/src/branch/initial-setup/examples)
|
||||
Refer the examples in Java language, fully supported by the Seclore Server SDK. Explore the intricacies of secure data management, access controls, and much more by visiting the following link: [Examples](https://repo.seclore.com/public/seclore-java-sdk/src/branch/PS-1/examples)
|
||||
|
||||
## Learning Resources <a name="Learning"></a>
|
||||
|
||||
|
@ -28,6 +26,7 @@ While this is an excellent learning resource for the SDK, there are other resour
|
|||
|
||||
### Official Resources
|
||||
|
||||
- [Developer Guide](https://git-link-of-Seclore-Server-SDK-Java-Guide.pdf)
|
||||
- [API Reference](http://seclore-sdk.secloredevops.com/4.4.16.0/)
|
||||
- [Seclore Server SDK Package](https://repo.seclore.com/public/-/packages/generic/seclore-java-sdk/4.4.16.0)
|
||||
- [Developer Guide](https://repo.seclore.com/public/seclore-java-sdk/src/branch/PS-1/Seclore%20Server%20SDK%20Java%20Guide%20v4.5.2.0.pdf)
|
||||
- [API Reference](https://seclore-sdk-local.docs.secloredevops.com/test/apidocs)
|
||||
- [Error Codes](https://seclore-sdk-local.docs.secloredevops.com/test/errorcodes)
|
||||
- [Seclore Server SDK Package](https://repo.seclore.com/public/-/packages/generic/seclore-java-sdk/test)
|
||||
|
|
Binary file not shown.
|
@ -0,0 +1,24 @@
|
|||
|
||||
Protect With Hot Folder and Wrap Sample App
|
||||
============================================
|
||||
|
||||
Deployment Steps:
|
||||
------------------
|
||||
|
||||
1. make sure your policy server is running . This app requires java 8 or above to run so make
|
||||
sure java 8 or above is installed.
|
||||
|
||||
2. go inside 'bin/Protect With Hot Folder and Wrap Sample App'
|
||||
|
||||
3. Configure the 'tenant config.xml' in 'config/'
|
||||
a. Policy Server Details:
|
||||
server : Server name on which Policy Server is running
|
||||
port : Server Port on which Policy Server is running
|
||||
app-name : Policy Server application name
|
||||
|
||||
b. fill hot folder details i.e id and passphrase
|
||||
|
||||
4. If you are using java 8 , put libs present inside 'doc/JCE Files/java8' into
|
||||
'bin/Protect With Hot Folder and Wrap Sample App/lib'
|
||||
|
||||
5. click on run.bat to start sample app , follow instruction on terminal
|
Binary file not shown.
|
@ -0,0 +1,15 @@
|
|||
|
||||
log4j.category.WSCLIENT=debug, WSCLIENT
|
||||
|
||||
# If we want to change the Appender, we have to change
|
||||
# UtilFunction.initializeLoggers() too, because it assumes that the appender
|
||||
# is 'org.apache.log4j.RollingFileAppender' and changes path of the file by
|
||||
# getting appender from this logger.
|
||||
log4j.appender.WSCLIENT=com.seclore.fs.ws.client.logger.DailyZippedRollingFileAppender
|
||||
# Path of the file should be relative to application ROOT
|
||||
log4j.appender.WSCLIENT.File=logs/WSClient.log
|
||||
log4j.appender.WSCLIENT.MaxFileSize=10MB
|
||||
#log4j.appender.REQUEST_LOGGER.MaxBackupIndex=10
|
||||
log4j.appender.WSCLIENT.DatePattern='_'yyyy-MM-dd
|
||||
log4j.appender.WSCLIENT.layout=org.apache.log4j.PatternLayout
|
||||
log4j.appender.WSCLIENT.layout.ConversionPattern=%d{MMM dd, yyyy HH:mm:ss.SSS} %F:%L%n%p: %m%n
|
|
@ -0,0 +1,43 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<Configuration status="info" >
|
||||
|
||||
<Properties>
|
||||
<Property name="basePath">${ctx:applicationPath}/logs</Property>
|
||||
</Properties>
|
||||
|
||||
<Loggers>
|
||||
<Asynclogger name="WSCLIENT" level="info" additivity="false" >
|
||||
<appender-ref ref="WSCLIENT_APPENDER" />
|
||||
</Asynclogger>
|
||||
</Loggers>
|
||||
|
||||
<Appenders>
|
||||
|
||||
<RollingRandomAccessFile name="WSCLIENT_APPENDER" fileName="${basePath}/WSClient.log" filePattern="${basePath}/WSClient_%d{yyyy-MM-dd}_%i.log.zip">
|
||||
<PatternLayout>
|
||||
<charset>UTF-8</charset>
|
||||
<pattern>%d{MMM dd, yyyy HH:mm:ss.SSS} :%t %n%p: %m%n</pattern>
|
||||
</PatternLayout>
|
||||
<Policies>
|
||||
<TimeBasedTriggeringPolicy interval="1" modulate="true" />
|
||||
<SizeBasedTriggeringPolicy size="10MB"/>
|
||||
</Policies>
|
||||
<DefaultRolloverStrategy fileIndex="nomax">
|
||||
<!--
|
||||
* Uncommenting the following code will enable deletion of log files of above name and
|
||||
* which are older than 90 days(configurable only days accepted)
|
||||
* Be careful! There is no way to recover files deleted this way.
|
||||
-->
|
||||
<!--
|
||||
<Delete basePath="${basePath}" >
|
||||
<IfFileName glob="PolicyServer_*.log.zip" />
|
||||
<IfLastModified age="90d" />
|
||||
</Delete>
|
||||
-->
|
||||
</DefaultRolloverStrategy>
|
||||
</RollingRandomAccessFile>
|
||||
|
||||
</Appenders>
|
||||
|
||||
</Configuration>
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -0,0 +1,18 @@
|
|||
@echo off
|
||||
set "CURRENT_DIR=%cd%"
|
||||
echo ---------------------------------------------------------
|
||||
echo Seclore 'Protect with Hot Folder Wrap Sample App' Utility
|
||||
echo ---------------------------------------------------------
|
||||
echo.
|
||||
|
||||
rem if your want to run on a different jdk or java path is not configured uncomment below line
|
||||
rem for example ,
|
||||
rem set path="C:\Program Files\Java\jdk-11.0.1\bin";
|
||||
java -version
|
||||
echo.
|
||||
|
||||
REM uncomment below line to see the version of sample app i.e( remove REM mentioned below)
|
||||
REM java -cp "./lib/sample-app.jar"; com.seclore.fs.protect.example.Version
|
||||
|
||||
java -cp "./lib/*"; com.seclore.fs.protect.example.main.SecloreMain
|
||||
pause
|
|
@ -0,0 +1,37 @@
|
|||
FileSecure Interfaces integration source code reference.
|
||||
|
||||
FS Helper Initialization
|
||||
------------------------
|
||||
- At application startup initializing FSHelperlibrary and FSHelper
|
||||
- Below classes are used for the same
|
||||
- SecloreMain
|
||||
- static block :-
|
||||
InitializeWSClient.initializeHelperLibrary((FSHELPERLIBRARY_CONFIG_XML_PATH, ););
|
||||
InitializeWSClient.initializeHelper(HELPER_INSTANCE_KEY, FSHELPER_RESOURCE_PATH, FSHELPER_CONFIG_XML_PATH, );
|
||||
- InitializeWSClient
|
||||
- initializeHelperLibrary( ... )
|
||||
- initializeHelper( ... )
|
||||
|
||||
|
||||
|
||||
Main Class
|
||||
------------
|
||||
- com.seclore.fs.protect.example.main
|
||||
- SecloreMain class
|
||||
|
||||
Note:
|
||||
=====
|
||||
while preparing xml string for request or response. please escape below spacial character for the string which will be written within xml tag.
|
||||
"&" -> "&"
|
||||
"<" -> "<"
|
||||
">", -> ">"
|
||||
"\"" -> """
|
||||
"'" -> "'";
|
||||
|
||||
Refer: com.seclore.fs.protect.example.util.XMLUtil class and
|
||||
- escapeForXML () method
|
||||
|
||||
Example: sample xml is "<request><file-name>Sample Sales & purchase report.pdf</file-name><request>"
|
||||
here "Sample Sales and purchase report" should be escaped.
|
||||
Use: String fileName = XMLHelper.escapeForXML( "Sample Sales & purchase report" );
|
||||
"<request><file-name>"+fileName+"</file-name><request>"
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -0,0 +1,16 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<classpath>
|
||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
|
||||
<classpathentry kind="src" path="src"/>
|
||||
<classpathentry kind="lib" path="lib/bc-fips-1.0.2.4.jar"/>
|
||||
<classpathentry kind="lib" path="lib/commons-codec-1.6.jar"/>
|
||||
<classpathentry kind="lib" path="lib/fs-smaillibrary-1.2.7.0.jar"/>
|
||||
<classpathentry kind="lib" path="lib/juniversalchardet-1.0.3.jar"/>
|
||||
<classpathentry kind="lib" path="lib/xercesImpl-2.12.2.jar"/>
|
||||
<classpathentry kind="lib" path="lib/log4j-api-2.17.1.jar"/>
|
||||
<classpathentry kind="lib" path="lib/log4j-core-2.17.1.jar"/>
|
||||
<classpathentry kind="lib" path="lib/disruptor-3.3.7.jar"/>
|
||||
<classpathentry kind="lib" path="lib/fs-ws-client-4.4.17.0.jar"/>
|
||||
<classpathentry kind="lib" path="lib/seclore-io-1.0.0.0.jar"/>
|
||||
<classpathentry kind="output" path="bin"/>
|
||||
</classpath>
|
|
@ -0,0 +1,17 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<projectDescription>
|
||||
<name>Protect With Hot Folder and Wrap Sample App Code</name>
|
||||
<comment></comment>
|
||||
<projects>
|
||||
</projects>
|
||||
<buildSpec>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.jdt.core.javabuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
</buildSpec>
|
||||
<natures>
|
||||
<nature>org.eclipse.jdt.core.javanature</nature>
|
||||
</natures>
|
||||
</projectDescription>
|
|
@ -0,0 +1,11 @@
|
|||
eclipse.preferences.version=1
|
||||
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
|
||||
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
|
||||
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
|
||||
org.eclipse.jdt.core.compiler.compliance=1.8
|
||||
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
|
||||
org.eclipse.jdt.core.compiler.debug.localVariable=generate
|
||||
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
|
||||
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
|
||||
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
|
||||
org.eclipse.jdt.core.compiler.source=1.8
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -0,0 +1,108 @@
|
|||
<?xml version="1.0" encoding="UTF-16" ?>
|
||||
<!-- Configuration File (1.1.0.0). -->
|
||||
<!-- This file contains the XML strcuture which should be passed
|
||||
to the IFSHelperInitialize API to initialize the Library -->
|
||||
|
||||
<fs-helper-ps-config>
|
||||
<ps-details>
|
||||
<!-- URLs of the Policy Server. -->
|
||||
<urls>
|
||||
<!--
|
||||
URL of the Policy Server. Multiple such tags can be present.
|
||||
It is recommended to put reachable URL as first URL and then
|
||||
backup URL.
|
||||
-->
|
||||
<url>
|
||||
<!--
|
||||
Parts of URL.
|
||||
For example, if URL is https://demo.seclore.com:9443/PolicyServer,
|
||||
server: demo.seclore.com
|
||||
port: 9443
|
||||
app-name: PolicyServer.
|
||||
|
||||
Value of 'port' is mandatory.
|
||||
-->
|
||||
<server></server>
|
||||
<port></port>
|
||||
<app-name></app-name>
|
||||
</url>
|
||||
</urls>
|
||||
</ps-details>
|
||||
|
||||
<!-- Login details for this instance -->
|
||||
<login-details>
|
||||
<!--
|
||||
Login user type.
|
||||
1: Cabinet User
|
||||
2: PS End-User
|
||||
-->
|
||||
<user-type>1</user-type>
|
||||
|
||||
<!-- Structure for user type Cabinet User(1) -->
|
||||
<!--
|
||||
Hot Folder Cabinet details. This details are used to authenticate with
|
||||
Policy Server.
|
||||
-->
|
||||
<hotfolder-cabinet>
|
||||
<!--
|
||||
Hot Folder Cabinet identifier.
|
||||
-->
|
||||
<id></id>
|
||||
<!--
|
||||
Hot Folder Cabinet pass phrase.
|
||||
-->
|
||||
<passphrase></passphrase>
|
||||
|
||||
<!--
|
||||
Flag to enable advance priviledges
|
||||
-->
|
||||
<allow-advanced-privileges>false</allow-advanced-privileges>
|
||||
</hotfolder-cabinet>
|
||||
|
||||
</login-details>
|
||||
|
||||
<!-- This tag defines whether inline attachment should be embedded in unprotected mail body or should be provided separately
|
||||
true : Inline attachments will get embedded in mail body.
|
||||
false : Inline attachments will be provided separately and not as mail body content.
|
||||
-->
|
||||
<include-inline-attachment-in-mail-body>false</include-inline-attachment-in-mail-body>
|
||||
|
||||
<!--
|
||||
The Locale of FSHelper.
|
||||
Locale String Format : <language code>[_<country code>[_<variant code>]]
|
||||
-->
|
||||
<locale>en</locale>
|
||||
|
||||
<!--
|
||||
Policy Server session pool configuration.
|
||||
-->
|
||||
<session-pool>
|
||||
<!--
|
||||
Max. number of connection with Policy Server. This value is based on
|
||||
(equal to) active concurrent users of Integrating Application deployment.
|
||||
-->
|
||||
<max-size>50</max-size>
|
||||
<!--
|
||||
Policy Server session timeout in seconds. This is typically 15 minutes (900 seconds).
|
||||
for Policy Server. Value of this tag can be found in configuration file
|
||||
of Web Application Server (web.xml for Tomcat).
|
||||
-->
|
||||
<default-session-timeout>900</default-session-timeout>
|
||||
</session-pool>
|
||||
|
||||
<!--
|
||||
Details of proxy server, if required to connect to Policy Server.
|
||||
If not required, remove the following tag itself. It is optional.
|
||||
-->
|
||||
<proxy-details>
|
||||
<server></server>
|
||||
<port></port>
|
||||
<user></user>
|
||||
<password></password>
|
||||
<!--
|
||||
Semicolon (;) separated list of URL patterns, just like IE bypass
|
||||
list in Internet Explorer.
|
||||
-->
|
||||
<bypass-list></bypass-list>
|
||||
</proxy-details>
|
||||
</fs-helper-ps-config>
|
|
@ -0,0 +1,25 @@
|
|||
<?xml version="1.0" encoding="UTF-16" ?>
|
||||
<!-- Configuration File (1.0.1.0). -->
|
||||
<!-- This file contains the XML strcuture which should be passed
|
||||
to the IFSHelperInitialize API to initialize the Library -->
|
||||
|
||||
<fs-helper-config>
|
||||
<!-- Locale being used in the application. Currently, this tag is ignored. -->
|
||||
<locale/>
|
||||
<!-- Application Path -->
|
||||
<app-path></app-path>
|
||||
<!-- Whether the FSHelper Library need to initialize the loggers.
|
||||
true - FSHelper Library will initialize the logger
|
||||
false - calling application has already initialized the logger.
|
||||
-->
|
||||
<initalize-logger>true</initalize-logger>
|
||||
<!-- Whether enforce BC-FIPS as security provider.
|
||||
true - Enforce BC-FIPS as security provider.
|
||||
false - Use default security provider (Java security provider).
|
||||
-->
|
||||
<enforce-fips>false</enforce-fips>
|
||||
|
||||
<!-- Provide the integrating app name -->
|
||||
<integrated-app-name></integrated-app-name>
|
||||
|
||||
</fs-helper-config>
|
|
@ -0,0 +1,15 @@
|
|||
|
||||
log4j.category.WSCLIENT=debug, WSCLIENT
|
||||
|
||||
# If we want to change the Appender, we have to change
|
||||
# UtilFunction.initializeLoggers() too, because it assumes that the appender
|
||||
# is 'org.apache.log4j.RollingFileAppender' and changes path of the file by
|
||||
# getting appender from this logger.
|
||||
log4j.appender.WSCLIENT=com.seclore.fs.ws.client.logger.DailyZippedRollingFileAppender
|
||||
# Path of the file should be relative to application ROOT
|
||||
log4j.appender.WSCLIENT.File=logs/WSClient.log
|
||||
log4j.appender.WSCLIENT.MaxFileSize=10MB
|
||||
#log4j.appender.REQUEST_LOGGER.MaxBackupIndex=10
|
||||
log4j.appender.WSCLIENT.DatePattern='_'yyyy-MM-dd
|
||||
log4j.appender.WSCLIENT.layout=org.apache.log4j.PatternLayout
|
||||
log4j.appender.WSCLIENT.layout.ConversionPattern=%d{MMM dd, yyyy HH:mm:ss.SSS} %F:%L%n%p: %m%n
|
|
@ -0,0 +1,43 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<Configuration status="info" >
|
||||
|
||||
<Properties>
|
||||
<Property name="basePath">${ctx:applicationPath}/logs</Property>
|
||||
</Properties>
|
||||
|
||||
<Loggers>
|
||||
<Asynclogger name="WSCLIENT" level="info" additivity="false" >
|
||||
<appender-ref ref="WSCLIENT_APPENDER" />
|
||||
</Asynclogger>
|
||||
</Loggers>
|
||||
|
||||
<Appenders>
|
||||
|
||||
<RollingRandomAccessFile name="WSCLIENT_APPENDER" fileName="${basePath}/WSClient.log" filePattern="${basePath}/WSClient_%d{yyyy-MM-dd}_%i.log.zip">
|
||||
<PatternLayout>
|
||||
<charset>UTF-8</charset>
|
||||
<pattern>%d{MMM dd, yyyy HH:mm:ss.SSS}: %t: %p: %m%n</pattern>
|
||||
</PatternLayout>
|
||||
<Policies>
|
||||
<TimeBasedTriggeringPolicy interval="1" modulate="true" />
|
||||
<SizeBasedTriggeringPolicy size="10MB"/>
|
||||
</Policies>
|
||||
<DefaultRolloverStrategy fileIndex="nomax">
|
||||
<!--
|
||||
* Uncommenting the following code will enable deletion of log files of above name and
|
||||
* which are older than 90 days(configurable only days accepted)
|
||||
* Be careful! There is no way to recover files deleted this way.
|
||||
-->
|
||||
<!--
|
||||
<Delete basePath="${basePath}" >
|
||||
<IfFileName glob="PolicyServer_*.log.zip" />
|
||||
<IfLastModified age="90d" />
|
||||
</Delete>
|
||||
-->
|
||||
</DefaultRolloverStrategy>
|
||||
</RollingRandomAccessFile>
|
||||
|
||||
</Appenders>
|
||||
|
||||
</Configuration>
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -0,0 +1,23 @@
|
|||
package com.seclore.fs.protect.example;
|
||||
|
||||
/**
|
||||
* Represents the Sample App version.
|
||||
*/
|
||||
public class Version
|
||||
{
|
||||
/**
|
||||
* The version of the Sample App.
|
||||
*/
|
||||
public static final String Version = "3.0.0.0";
|
||||
|
||||
/**
|
||||
* Displays the version of the Sample App
|
||||
*
|
||||
* @param args
|
||||
*/
|
||||
public static void main(String[] args)
|
||||
{
|
||||
System.out.println("Sample App version : " + Version);
|
||||
System.out.println("Copyright (c) 2008 Seclore Technology Pvt. Ltd.");
|
||||
}
|
||||
}
|
|
@ -0,0 +1,193 @@
|
|||
package com.seclore.fs.protect.example.core;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.FileInputStream;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.io.StringWriter;
|
||||
|
||||
import javax.xml.parsers.DocumentBuilder;
|
||||
import javax.xml.parsers.DocumentBuilderFactory;
|
||||
import javax.xml.transform.Transformer;
|
||||
import javax.xml.transform.TransformerFactory;
|
||||
import javax.xml.transform.dom.DOMSource;
|
||||
import javax.xml.transform.stream.StreamResult;
|
||||
|
||||
import org.mozilla.universalchardet.UniversalDetector;
|
||||
import org.w3c.dom.Document;
|
||||
import org.xml.sax.InputSource;
|
||||
|
||||
import com.seclore.fs.helper.exception.FSHelperException;
|
||||
import com.seclore.fs.helper.library.FSHelperLibrary;
|
||||
|
||||
public class InitializeWSClient {
|
||||
/**
|
||||
* @param configPath
|
||||
* Takes the application config file path as input
|
||||
* @throws Exception
|
||||
*/
|
||||
public static void initializeHelperLibrary(String configPath) throws Exception {
|
||||
try {
|
||||
String configContentXMLString = getConfigFileContent(configPath);
|
||||
// Initialize method takes WSClient config content not the config file path.
|
||||
FSHelperLibrary.initialize(configContentXMLString);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @param helperId
|
||||
* Tenant Id
|
||||
* @param helperResourcePath
|
||||
* Resource Path for files of Seclore Policy Server.
|
||||
* To be left empty here.
|
||||
* @param helperConfigPath
|
||||
* File path for 'tenant config.xml' file
|
||||
* @throws Exception
|
||||
* Code snippet won't run if any exception is thrown in this
|
||||
* block
|
||||
*/
|
||||
public static void initializeHelper(String helperId, String helperResourcePath, String helperConfigPath)
|
||||
throws Exception {
|
||||
try {
|
||||
String configContentXMLString = getConfigFileContent(helperConfigPath);
|
||||
// Initialize method takes WSClient config content not the config file path.
|
||||
FSHelperLibrary.initializeHelper(helperId, helperResourcePath, configContentXMLString);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* This method reads an XML file and returns the content of the XML file in
|
||||
* string format
|
||||
*
|
||||
* @param appPath
|
||||
* XML file path
|
||||
* @return File content in string format
|
||||
* @throws Exception
|
||||
*/
|
||||
private static String getConfigFileContent(String appPath) throws Exception {
|
||||
validateConfigFile(appPath);
|
||||
|
||||
InputStream inputStream = null;
|
||||
try {
|
||||
String lstrEncoding = detectEncoding(appPath);
|
||||
if (lstrEncoding == null || lstrEncoding.trim().isEmpty()) {
|
||||
lstrEncoding = "UTF-8";
|
||||
}
|
||||
|
||||
DocumentBuilderFactory builderFactory = DocumentBuilderFactory.newInstance();
|
||||
builderFactory.setNamespaceAware(false);
|
||||
builderFactory.setValidating(false);
|
||||
DocumentBuilder builder = builderFactory.newDocumentBuilder();
|
||||
inputStream = new FileInputStream(appPath);
|
||||
InputSource lInputSource = new InputSource(inputStream);
|
||||
lInputSource.setEncoding(lstrEncoding);
|
||||
Document document = builder.parse(lInputSource);
|
||||
|
||||
TransformerFactory lTransFactory = TransformerFactory.newInstance();
|
||||
Transformer lTrans = lTransFactory.newTransformer();
|
||||
DOMSource lSource = new DOMSource(document);
|
||||
StringWriter lStringWriter = new StringWriter();
|
||||
lTrans.transform(lSource, new StreamResult(lStringWriter));
|
||||
return lStringWriter.toString();
|
||||
} catch (Exception e) {
|
||||
System.out.println("*** Config file should be in UTF-8 encoding ***");
|
||||
e.printStackTrace();
|
||||
System.exit(0);
|
||||
} finally {
|
||||
if (inputStream != null) {
|
||||
try {
|
||||
inputStream.close();
|
||||
} catch (IOException ioException) {
|
||||
// ignore
|
||||
}
|
||||
}
|
||||
}
|
||||
return "";
|
||||
}
|
||||
|
||||
/**
|
||||
* Validates whether the file exists at the given location & has valid BOM
|
||||
* format
|
||||
*
|
||||
* @param configFilePath
|
||||
* @throws Exception
|
||||
* @return The file object representing the configFilePath
|
||||
*/
|
||||
private static File validateConfigFile(String configFilePath) throws Exception {
|
||||
|
||||
if (configFilePath == null || configFilePath.trim().isEmpty()) {
|
||||
throw new Exception("Configuration File path is not provided.");
|
||||
}
|
||||
|
||||
File file = new File(configFilePath);
|
||||
if (!file.exists()) {
|
||||
throw new Exception("Configuration File does not exist at '" + file.getAbsolutePath() + "'");
|
||||
}
|
||||
|
||||
if (!file.isFile()) {
|
||||
throw new Exception("'" + file.getAbsolutePath() + "' is not a file.");
|
||||
}
|
||||
|
||||
// Length 3 is checked to make sure that enough bytes are available for
|
||||
// BOM reading.
|
||||
if (file.length() < 3) {
|
||||
throw new Exception("'" + file.getAbsolutePath() + "' is not a valid configuration file.");
|
||||
}
|
||||
return file;
|
||||
}
|
||||
|
||||
/**
|
||||
* Detect encoding format of file
|
||||
*
|
||||
* @param pConfigXmlPath
|
||||
* File path whose encoding type is to be detected
|
||||
* @return encoding format (eg: utf-8, utf-16)
|
||||
*/
|
||||
private static String detectEncoding(String configXmlPath) {
|
||||
FileInputStream fis = null;
|
||||
try {
|
||||
fis = new FileInputStream(configXmlPath);
|
||||
UniversalDetector detector = new UniversalDetector(null);
|
||||
byte[] buffer = new byte[512];
|
||||
int read;
|
||||
while ((read = fis.read(buffer)) > 0 && !detector.isDone()) {
|
||||
detector.handleData(buffer, 0, read);
|
||||
}
|
||||
detector.dataEnd();
|
||||
String encoding = detector.getDetectedCharset();
|
||||
detector.reset();
|
||||
return encoding;
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
} finally {
|
||||
if (fis != null) {
|
||||
try {
|
||||
fis.close();
|
||||
} catch (IOException e) {
|
||||
// Igniore
|
||||
}
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Terminate the created session and reset the initialized Server SDK library.
|
||||
*/
|
||||
public static void terminateWSClient() {
|
||||
try {
|
||||
FSHelperLibrary.logInfo("Terminating FSHelper Library");
|
||||
if (FSHelperLibrary.isTerminated() == false) {
|
||||
System.out.println("FSHelperLibrary.isTerminated(): " + FSHelperLibrary.isTerminated());
|
||||
FSHelperLibrary.terminate();
|
||||
}
|
||||
} catch (FSHelperException e) {
|
||||
FSHelperLibrary.logError(e.getMessage(), e);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,152 @@
|
|||
package com.seclore.fs.protect.example.main;
|
||||
|
||||
import java.util.Scanner;
|
||||
|
||||
import com.seclore.fs.helper.core.ProtectedFile;
|
||||
import com.seclore.fs.helper.enums.ProtectionType;
|
||||
import com.seclore.fs.helper.exception.FSHelperException;
|
||||
import com.seclore.fs.helper.library.FSHelper;
|
||||
import com.seclore.fs.helper.library.FSHelperLibrary;
|
||||
import com.seclore.fs.protect.example.core.InitializeWSClient;
|
||||
|
||||
public class SecloreMain {
|
||||
// # FS Helper library is multi-tenant. Use unique tenant identifier for each
|
||||
// tenant
|
||||
private static String tenantID = "Tenant-1";
|
||||
|
||||
// # This file contains information about the Application into which this code
|
||||
// snippet is to be integrated.
|
||||
private static final String appConfigXMLFilePath = "config/config.xml";
|
||||
|
||||
// # This file contains info for creating session with Seclore Policy Server and
|
||||
// initializing Server SDK library
|
||||
private static final String tenantConfigXMLFilePath = "config/cabinet config.xml";
|
||||
|
||||
// # Used to take user input
|
||||
private static Scanner scanner = null;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* This block initializes the Server SDK library and creates a session with
|
||||
* Seclore Policy Server
|
||||
* </p>
|
||||
*
|
||||
* @exception Code snippet won't run if any exception is thrown in this block.
|
||||
*/
|
||||
static {
|
||||
try {
|
||||
InitializeWSClient.initializeHelperLibrary(appConfigXMLFilePath);
|
||||
InitializeWSClient.initializeHelper(tenantID, "", tenantConfigXMLFilePath);
|
||||
scanner = new Scanner(System.in);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
System.exit(0);
|
||||
}
|
||||
}
|
||||
|
||||
// # Entry point to run this application
|
||||
public static void main(String[] args) {
|
||||
try {
|
||||
String outputFilePath = protectAndWrapFile();
|
||||
|
||||
if (outputFilePath != null && !outputFilePath.trim().isEmpty()) {
|
||||
|
||||
System.out.println("File '" + outputFilePath + "' is protected and wrapped successfully");
|
||||
} else {
|
||||
throw new Exception("Unexpected error");
|
||||
}
|
||||
|
||||
} catch (Exception exp) {
|
||||
exp.printStackTrace();
|
||||
} finally {
|
||||
if (scanner != null) {
|
||||
scanner.close();
|
||||
}
|
||||
|
||||
InitializeWSClient.terminateWSClient();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Protect and wrap a file using Seclore SDK
|
||||
*
|
||||
* @return the absolute file path of protected file
|
||||
* @throws Exception
|
||||
*/
|
||||
public static String protectAndWrapFile() throws Exception {
|
||||
System.out.println("Enter absolute path of the file to be protected and wrapped:");
|
||||
String filePath = scanner.nextLine();
|
||||
|
||||
// # get the FSHelper object by specifying the tenantId.
|
||||
// note: This tenant id should be same which was used during initialization of
|
||||
// Seclore SDK
|
||||
FSHelper tenantObj = FSHelperLibrary.getHelper(tenantID);
|
||||
|
||||
// # does basic validation checks to see if the file is supported by SDK and is
|
||||
// not already protected
|
||||
validateIfFileSupportsProtection(tenantObj, filePath);
|
||||
|
||||
// # used to change display name of file in activity log
|
||||
String displayFileName = filePath;
|
||||
// # get XML structure to protect with hot folder
|
||||
String protectionDetails = getProtectDetailsXML();
|
||||
// # show details about protector
|
||||
String protectorDetails = "";
|
||||
// # activity comments to be shown
|
||||
String actvityComments = "Protected by using FS Helper Library's protectAndWrap method";
|
||||
|
||||
ProtectedFile protectedWrappedFile = tenantObj.protectAndWrap(null,
|
||||
filePath,
|
||||
displayFileName,
|
||||
ProtectionType.PROTECT_WITH_HF,
|
||||
protectionDetails,
|
||||
protectorDetails,
|
||||
actvityComments);
|
||||
System.out.println("Protected File Id: " + protectedWrappedFile.getFileId());
|
||||
|
||||
return protectedWrappedFile.getFilePath();
|
||||
}
|
||||
|
||||
/**
|
||||
* Validates if the file supports Seclore protection
|
||||
*
|
||||
* @param tenantObj - FSHelper object created for the tenant.
|
||||
* @param filePath - Absolute path of the file to be protected.
|
||||
* @throws Exception
|
||||
*/
|
||||
private static void validateIfFileSupportsProtection(FSHelper tenantObj, String filePath)
|
||||
throws FSHelperException, Exception {
|
||||
// check if file is already Seclore protected
|
||||
if (tenantObj.isProtectedFile(filePath) || tenantObj.isHTMLWrapped(filePath)) {
|
||||
throw new Exception("File '" + filePath + "' is already protected");
|
||||
}
|
||||
|
||||
// check if file extension is supported by Seclore FS Helper Library
|
||||
if (tenantObj.isSupportedFile(filePath) == false && tenantObj.isBasicProtectionSupported(filePath) == false) {
|
||||
String fileExt = filePath.substring(filePath.lastIndexOf(".") + 1);
|
||||
// note: if file is not of standard format and does not support basic protection
|
||||
// then throw error
|
||||
throw new Exception("File with extention '" + fileExt + "' is not supported by Seclore FS Helper Library");
|
||||
}
|
||||
|
||||
// check if file extension is supported for HTML wrapping by Seclore FS Helper
|
||||
// Library
|
||||
if (tenantObj.isHTMLWrapSupported(filePath) == false) {
|
||||
// note: file is of standard format but not supported for HTML wrapping
|
||||
throw new Exception("File '" + filePath + "' does not support HTML wrapping");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Forms the protection XML request string to be sent to PS.
|
||||
*
|
||||
* @return protection request XML structure
|
||||
*/
|
||||
public static String getProtectDetailsXML() throws Exception {
|
||||
System.out.println("Enter Hot Folder id:");
|
||||
String HFid = scanner.nextLine();
|
||||
String protectionDetailsXML = "<hot-folder><id>" + HFid + "</id></hot-folder>";
|
||||
return protectionDetailsXML;
|
||||
}
|
||||
|
||||
}
|
Binary file not shown.
|
@ -0,0 +1,43 @@
|
|||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
|
||||
# Set the project root directory
|
||||
PROJECT_ROOT=$(dirname "$0")/..
|
||||
|
||||
# Function to exit script
|
||||
_exitScriptIfError() {
|
||||
if [ $1 -ne 0 ]; then
|
||||
echo $2
|
||||
# Handle the error here, e.g., exit the script or perform some recovery actions
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
|
||||
# Clean all bin folders
|
||||
rm -rf "$PROJECT_ROOT/Sample Code/bin/Protect With Hot Folder and Wrap Sample App/config"/*
|
||||
rm -rf "$PROJECT_ROOT/Sample Code/bin/Protect With Hot Folder and Wrap Sample App/lib"/*
|
||||
|
||||
# Clear the src/bin dir containing compiled class files
|
||||
rm -rf "$PROJECT_ROOT/Sample Code/src/Protect With Hot Folder and Wrap Sample App Code/bin"/*
|
||||
|
||||
echo "Successfully cleared the existing bin dir."
|
||||
|
||||
#find and compile all java files
|
||||
find "$PROJECT_ROOT/Sample Code/src/Protect With Hot Folder and Wrap Sample App Code/src" -name "*.java" -exec javac -d "$PROJECT_ROOT/Sample Code/src/Protect With Hot Folder and Wrap Sample App Code/bin" -cp "$PROJECT_ROOT/Sample Code/src/Protect With Hot Folder and Wrap Sample App Code/lib/*" {} +
|
||||
_exitScriptIfError $? "ERROR: Java files compilation failed."
|
||||
echo "Successfully compiled the java files."
|
||||
|
||||
# Package the compiled classes into a JAR file
|
||||
jar cvf "$PROJECT_ROOT/Sample Code/bin/Protect With Hot Folder and Wrap Sample App/lib/sample-app.jar" -C "$PROJECT_ROOT/Sample Code/src/Protect With Hot Folder and Wrap Sample App Code/bin" .
|
||||
_exitScriptIfError $? "ERROR: error making jar file."
|
||||
echo "Successfully built the jar file ."
|
||||
|
||||
# Copy all libs and config files to bin
|
||||
cp -rf "$PROJECT_ROOT/Sample Code/src/Protect With Hot Folder and Wrap Sample App Code/lib"/* "$PROJECT_ROOT/Sample Code/bin/Protect With Hot Folder and Wrap Sample App/lib"
|
||||
_exitScriptIfError $? "Error while copying libs from '$PROJECT_ROOT/Sample Code/src/Protect With Hot Folder and Wrap Sample App Code/lib' to '$PROJECT_ROOT/Sample Code/bin/Protect With Hot Folder and Wrap Sample App/lib'"
|
||||
echo "Successfully copied libs from '$PROJECT_ROOT/Sample Code/src/Protect With Hot Folder and Wrap Sample App Code/lib' to '$PROJECT_ROOT/Sample Code/bin/Protect With Hot Folder and Wrap Sample App/lib'."
|
||||
|
||||
cp -rf "$PROJECT_ROOT/Sample Code/src/Protect With Hot Folder and Wrap Sample App Code/config"/* "$PROJECT_ROOT/Sample Code/bin/Protect With Hot Folder and Wrap Sample App/config"
|
||||
_exitScriptIfError $? "Error while copying config from '$PROJECT_ROOT/Sample Code/src/Protect With Hot Folder and Wrap Sample App Code/config' to '$PROJECT_ROOT/Sample Code/bin/Protect With Hot Folder and Wrap Sample App/config'."
|
||||
echo "Successfully compiled the java files."
|
Binary file not shown.
Binary file not shown.
|
@ -0,0 +1,24 @@
|
|||
|
||||
Protect With Hot Folder and Wrap Sample App
|
||||
============================================
|
||||
|
||||
Deployment Steps:
|
||||
------------------
|
||||
|
||||
1. make sure your policy server is running . This app requires java 8 or above to run so make
|
||||
sure java 8 or above is installed.
|
||||
|
||||
2. go inside 'bin/Protect With Hot Folder and Wrap Sample App'
|
||||
|
||||
3. Configure the 'tenant config.xml' in 'config/'
|
||||
a. Policy Server Details:
|
||||
server : Server name on which Policy Server is running
|
||||
port : Server Port on which Policy Server is running
|
||||
app-name : Policy Server application name
|
||||
|
||||
b. fill hot folder details i.e id and passphrase
|
||||
|
||||
4. If you are using java 8 , put libs present inside 'doc/JCE Files/java8' into
|
||||
'bin/Protect With Hot Folder and Wrap Sample App/lib'
|
||||
|
||||
5. click on run.bat to start sample app , follow instruction on terminal
|
Binary file not shown.
|
@ -0,0 +1,15 @@
|
|||
|
||||
log4j.category.WSCLIENT=debug, WSCLIENT
|
||||
|
||||
# If we want to change the Appender, we have to change
|
||||
# UtilFunction.initializeLoggers() too, because it assumes that the appender
|
||||
# is 'org.apache.log4j.RollingFileAppender' and changes path of the file by
|
||||
# getting appender from this logger.
|
||||
log4j.appender.WSCLIENT=com.seclore.fs.ws.client.logger.DailyZippedRollingFileAppender
|
||||
# Path of the file should be relative to application ROOT
|
||||
log4j.appender.WSCLIENT.File=logs/WSClient.log
|
||||
log4j.appender.WSCLIENT.MaxFileSize=10MB
|
||||
#log4j.appender.REQUEST_LOGGER.MaxBackupIndex=10
|
||||
log4j.appender.WSCLIENT.DatePattern='_'yyyy-MM-dd
|
||||
log4j.appender.WSCLIENT.layout=org.apache.log4j.PatternLayout
|
||||
log4j.appender.WSCLIENT.layout.ConversionPattern=%d{MMM dd, yyyy HH:mm:ss.SSS} %F:%L%n%p: %m%n
|
|
@ -0,0 +1,43 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<Configuration status="info" >
|
||||
|
||||
<Properties>
|
||||
<Property name="basePath">${ctx:applicationPath}/logs</Property>
|
||||
</Properties>
|
||||
|
||||
<Loggers>
|
||||
<Asynclogger name="WSCLIENT" level="info" additivity="false" >
|
||||
<appender-ref ref="WSCLIENT_APPENDER" />
|
||||
</Asynclogger>
|
||||
</Loggers>
|
||||
|
||||
<Appenders>
|
||||
|
||||
<RollingRandomAccessFile name="WSCLIENT_APPENDER" fileName="${basePath}/WSClient.log" filePattern="${basePath}/WSClient_%d{yyyy-MM-dd}_%i.log.zip">
|
||||
<PatternLayout>
|
||||
<charset>UTF-8</charset>
|
||||
<pattern>%d{MMM dd, yyyy HH:mm:ss.SSS} :%t %n%p: %m%n</pattern>
|
||||
</PatternLayout>
|
||||
<Policies>
|
||||
<TimeBasedTriggeringPolicy interval="1" modulate="true" />
|
||||
<SizeBasedTriggeringPolicy size="10MB"/>
|
||||
</Policies>
|
||||
<DefaultRolloverStrategy fileIndex="nomax">
|
||||
<!--
|
||||
* Uncommenting the following code will enable deletion of log files of above name and
|
||||
* which are older than 90 days(configurable only days accepted)
|
||||
* Be careful! There is no way to recover files deleted this way.
|
||||
-->
|
||||
<!--
|
||||
<Delete basePath="${basePath}" >
|
||||
<IfFileName glob="PolicyServer_*.log.zip" />
|
||||
<IfLastModified age="90d" />
|
||||
</Delete>
|
||||
-->
|
||||
</DefaultRolloverStrategy>
|
||||
</RollingRandomAccessFile>
|
||||
|
||||
</Appenders>
|
||||
|
||||
</Configuration>
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -0,0 +1,18 @@
|
|||
@echo off
|
||||
set "CURRENT_DIR=%cd%"
|
||||
echo ---------------------------------------------------------
|
||||
echo Seclore 'Protect with Hot Folder Wrap Sample App' Utility
|
||||
echo ---------------------------------------------------------
|
||||
echo.
|
||||
|
||||
rem if your want to run on a different jdk or java path is not configured uncomment below line
|
||||
rem for example ,
|
||||
rem set path="C:\Program Files\Java\jdk-11.0.1\bin";
|
||||
java -version
|
||||
echo.
|
||||
|
||||
REM uncomment below line to see the version of sample app i.e( remove REM mentioned below)
|
||||
REM java -cp "./lib/sample-app.jar"; com.seclore.fs.protect.example.Version
|
||||
|
||||
java -cp "./lib/*"; com.seclore.fs.protect.example.main.SecloreMain
|
||||
pause
|
|
@ -0,0 +1,37 @@
|
|||
FileSecure Interfaces integration source code reference.
|
||||
|
||||
FS Helper Initialization
|
||||
------------------------
|
||||
- At application startup initializing FSHelperlibrary and FSHelper
|
||||
- Below classes are used for the same
|
||||
- SecloreMain
|
||||
- static block :-
|
||||
InitializeWSClient.initializeHelperLibrary((FSHELPERLIBRARY_CONFIG_XML_PATH, ););
|
||||
InitializeWSClient.initializeHelper(HELPER_INSTANCE_KEY, FSHELPER_RESOURCE_PATH, FSHELPER_CONFIG_XML_PATH, );
|
||||
- InitializeWSClient
|
||||
- initializeHelperLibrary( ... )
|
||||
- initializeHelper( ... )
|
||||
|
||||
|
||||
|
||||
Main Class
|
||||
------------
|
||||
- com.seclore.fs.protect.example.main
|
||||
- SecloreMain class
|
||||
|
||||
Note:
|
||||
=====
|
||||
while preparing xml string for request or response. please escape below spacial character for the string which will be written within xml tag.
|
||||
"&" -> "&"
|
||||
"<" -> "<"
|
||||
">", -> ">"
|
||||
"\"" -> """
|
||||
"'" -> "'";
|
||||
|
||||
Refer: com.seclore.fs.protect.example.util.XMLUtil class and
|
||||
- escapeForXML () method
|
||||
|
||||
Example: sample xml is "<request><file-name>Sample Sales & purchase report.pdf</file-name><request>"
|
||||
here "Sample Sales and purchase report" should be escaped.
|
||||
Use: String fileName = XMLHelper.escapeForXML( "Sample Sales & purchase report" );
|
||||
"<request><file-name>"+fileName+"</file-name><request>"
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -0,0 +1,16 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<classpath>
|
||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
|
||||
<classpathentry kind="src" path="src"/>
|
||||
<classpathentry kind="lib" path="lib/bc-fips-1.0.2.4.jar"/>
|
||||
<classpathentry kind="lib" path="lib/commons-codec-1.6.jar"/>
|
||||
<classpathentry kind="lib" path="lib/fs-smaillibrary-1.2.7.0.jar"/>
|
||||
<classpathentry kind="lib" path="lib/juniversalchardet-1.0.3.jar"/>
|
||||
<classpathentry kind="lib" path="lib/xercesImpl-2.12.2.jar"/>
|
||||
<classpathentry kind="lib" path="lib/log4j-api-2.17.1.jar"/>
|
||||
<classpathentry kind="lib" path="lib/log4j-core-2.17.1.jar"/>
|
||||
<classpathentry kind="lib" path="lib/disruptor-3.3.7.jar"/>
|
||||
<classpathentry kind="lib" path="lib/fs-ws-client-4.4.17.0.jar"/>
|
||||
<classpathentry kind="lib" path="lib/seclore-io-1.0.0.0.jar"/>
|
||||
<classpathentry kind="output" path="bin"/>
|
||||
</classpath>
|
|
@ -0,0 +1,17 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<projectDescription>
|
||||
<name>Protect With Hot Folder and Wrap Sample App Code</name>
|
||||
<comment></comment>
|
||||
<projects>
|
||||
</projects>
|
||||
<buildSpec>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.jdt.core.javabuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
</buildSpec>
|
||||
<natures>
|
||||
<nature>org.eclipse.jdt.core.javanature</nature>
|
||||
</natures>
|
||||
</projectDescription>
|
|
@ -0,0 +1,11 @@
|
|||
eclipse.preferences.version=1
|
||||
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
|
||||
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
|
||||
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
|
||||
org.eclipse.jdt.core.compiler.compliance=1.8
|
||||
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
|
||||
org.eclipse.jdt.core.compiler.debug.localVariable=generate
|
||||
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
|
||||
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
|
||||
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
|
||||
org.eclipse.jdt.core.compiler.source=1.8
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -0,0 +1,108 @@
|
|||
<?xml version="1.0" encoding="UTF-16" ?>
|
||||
<!-- Configuration File (1.1.0.0). -->
|
||||
<!-- This file contains the XML strcuture which should be passed
|
||||
to the IFSHelperInitialize API to initialize the Library -->
|
||||
|
||||
<fs-helper-ps-config>
|
||||
<ps-details>
|
||||
<!-- URLs of the Policy Server. -->
|
||||
<urls>
|
||||
<!--
|
||||
URL of the Policy Server. Multiple such tags can be present.
|
||||
It is recommended to put reachable URL as first URL and then
|
||||
backup URL.
|
||||
-->
|
||||
<url>
|
||||
<!--
|
||||
Parts of URL.
|
||||
For example, if URL is https://demo.seclore.com:9443/PolicyServer,
|
||||
server: demo.seclore.com
|
||||
port: 9443
|
||||
app-name: PolicyServer.
|
||||
|
||||
Value of 'port' is mandatory.
|
||||
-->
|
||||
<server></server>
|
||||
<port></port>
|
||||
<app-name></app-name>
|
||||
</url>
|
||||
</urls>
|
||||
</ps-details>
|
||||
|
||||
<!-- Login details for this instance -->
|
||||
<login-details>
|
||||
<!--
|
||||
Login user type.
|
||||
1: Cabinet User
|
||||
2: PS End-User
|
||||
-->
|
||||
<user-type>1</user-type>
|
||||
|
||||
<!-- Structure for user type Cabinet User(1) -->
|
||||
<!--
|
||||
Hot Folder Cabinet details. This details are used to authenticate with
|
||||
Policy Server.
|
||||
-->
|
||||
<hotfolder-cabinet>
|
||||
<!--
|
||||
Hot Folder Cabinet identifier.
|
||||
-->
|
||||
<id></id>
|
||||
<!--
|
||||
Hot Folder Cabinet pass phrase.
|
||||
-->
|
||||
<passphrase></passphrase>
|
||||
|
||||
<!--
|
||||
Flag to enable advance priviledges
|
||||
-->
|
||||
<allow-advanced-privileges>false</allow-advanced-privileges>
|
||||
</hotfolder-cabinet>
|
||||
|
||||
</login-details>
|
||||
|
||||
<!-- This tag defines whether inline attachment should be embedded in unprotected mail body or should be provided separately
|
||||
true : Inline attachments will get embedded in mail body.
|
||||
false : Inline attachments will be provided separately and not as mail body content.
|
||||
-->
|
||||
<include-inline-attachment-in-mail-body>false</include-inline-attachment-in-mail-body>
|
||||
|
||||
<!--
|
||||
The Locale of FSHelper.
|
||||
Locale String Format : <language code>[_<country code>[_<variant code>]]
|
||||
-->
|
||||
<locale>en</locale>
|
||||
|
||||
<!--
|
||||
Policy Server session pool configuration.
|
||||
-->
|
||||
<session-pool>
|
||||
<!--
|
||||
Max. number of connection with Policy Server. This value is based on
|
||||
(equal to) active concurrent users of Integrating Application deployment.
|
||||
-->
|
||||
<max-size>50</max-size>
|
||||
<!--
|
||||
Policy Server session timeout in seconds. This is typically 15 minutes (900 seconds).
|
||||
for Policy Server. Value of this tag can be found in configuration file
|
||||
of Web Application Server (web.xml for Tomcat).
|
||||
-->
|
||||
<default-session-timeout>900</default-session-timeout>
|
||||
</session-pool>
|
||||
|
||||
<!--
|
||||
Details of proxy server, if required to connect to Policy Server.
|
||||
If not required, remove the following tag itself. It is optional.
|
||||
-->
|
||||
<proxy-details>
|
||||
<server></server>
|
||||
<port></port>
|
||||
<user></user>
|
||||
<password></password>
|
||||
<!--
|
||||
Semicolon (;) separated list of URL patterns, just like IE bypass
|
||||
list in Internet Explorer.
|
||||
-->
|
||||
<bypass-list></bypass-list>
|
||||
</proxy-details>
|
||||
</fs-helper-ps-config>
|
|
@ -0,0 +1,25 @@
|
|||
<?xml version="1.0" encoding="UTF-16" ?>
|
||||
<!-- Configuration File (1.0.1.0). -->
|
||||
<!-- This file contains the XML strcuture which should be passed
|
||||
to the IFSHelperInitialize API to initialize the Library -->
|
||||
|
||||
<fs-helper-config>
|
||||
<!-- Locale being used in the application. Currently, this tag is ignored. -->
|
||||
<locale/>
|
||||
<!-- Application Path -->
|
||||
<app-path></app-path>
|
||||
<!-- Whether the FSHelper Library need to initialize the loggers.
|
||||
true - FSHelper Library will initialize the logger
|
||||
false - calling application has already initialized the logger.
|
||||
-->
|
||||
<initalize-logger>true</initalize-logger>
|
||||
<!-- Whether enforce BC-FIPS as security provider.
|
||||
true - Enforce BC-FIPS as security provider.
|
||||
false - Use default security provider (Java security provider).
|
||||
-->
|
||||
<enforce-fips>false</enforce-fips>
|
||||
|
||||
<!-- Provide the integrating app name -->
|
||||
<integrated-app-name></integrated-app-name>
|
||||
|
||||
</fs-helper-config>
|
|
@ -0,0 +1,15 @@
|
|||
|
||||
log4j.category.WSCLIENT=debug, WSCLIENT
|
||||
|
||||
# If we want to change the Appender, we have to change
|
||||
# UtilFunction.initializeLoggers() too, because it assumes that the appender
|
||||
# is 'org.apache.log4j.RollingFileAppender' and changes path of the file by
|
||||
# getting appender from this logger.
|
||||
log4j.appender.WSCLIENT=com.seclore.fs.ws.client.logger.DailyZippedRollingFileAppender
|
||||
# Path of the file should be relative to application ROOT
|
||||
log4j.appender.WSCLIENT.File=logs/WSClient.log
|
||||
log4j.appender.WSCLIENT.MaxFileSize=10MB
|
||||
#log4j.appender.REQUEST_LOGGER.MaxBackupIndex=10
|
||||
log4j.appender.WSCLIENT.DatePattern='_'yyyy-MM-dd
|
||||
log4j.appender.WSCLIENT.layout=org.apache.log4j.PatternLayout
|
||||
log4j.appender.WSCLIENT.layout.ConversionPattern=%d{MMM dd, yyyy HH:mm:ss.SSS} %F:%L%n%p: %m%n
|
|
@ -0,0 +1,43 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<Configuration status="info" >
|
||||
|
||||
<Properties>
|
||||
<Property name="basePath">${ctx:applicationPath}/logs</Property>
|
||||
</Properties>
|
||||
|
||||
<Loggers>
|
||||
<Asynclogger name="WSCLIENT" level="info" additivity="false" >
|
||||
<appender-ref ref="WSCLIENT_APPENDER" />
|
||||
</Asynclogger>
|
||||
</Loggers>
|
||||
|
||||
<Appenders>
|
||||
|
||||
<RollingRandomAccessFile name="WSCLIENT_APPENDER" fileName="${basePath}/WSClient.log" filePattern="${basePath}/WSClient_%d{yyyy-MM-dd}_%i.log.zip">
|
||||
<PatternLayout>
|
||||
<charset>UTF-8</charset>
|
||||
<pattern>%d{MMM dd, yyyy HH:mm:ss.SSS}: %t: %p: %m%n</pattern>
|
||||
</PatternLayout>
|
||||
<Policies>
|
||||
<TimeBasedTriggeringPolicy interval="1" modulate="true" />
|
||||
<SizeBasedTriggeringPolicy size="10MB"/>
|
||||
</Policies>
|
||||
<DefaultRolloverStrategy fileIndex="nomax">
|
||||
<!--
|
||||
* Uncommenting the following code will enable deletion of log files of above name and
|
||||
* which are older than 90 days(configurable only days accepted)
|
||||
* Be careful! There is no way to recover files deleted this way.
|
||||
-->
|
||||
<!--
|
||||
<Delete basePath="${basePath}" >
|
||||
<IfFileName glob="PolicyServer_*.log.zip" />
|
||||
<IfLastModified age="90d" />
|
||||
</Delete>
|
||||
-->
|
||||
</DefaultRolloverStrategy>
|
||||
</RollingRandomAccessFile>
|
||||
|
||||
</Appenders>
|
||||
|
||||
</Configuration>
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -0,0 +1,23 @@
|
|||
package com.seclore.fs.protect.example;
|
||||
|
||||
/**
|
||||
* Represents the Sample App version.
|
||||
*/
|
||||
public class Version
|
||||
{
|
||||
/**
|
||||
* The version of the Sample App.
|
||||
*/
|
||||
public static final String Version = "3.0.0.0";
|
||||
|
||||
/**
|
||||
* Displays the version of the Sample App
|
||||
*
|
||||
* @param args
|
||||
*/
|
||||
public static void main(String[] args)
|
||||
{
|
||||
System.out.println("Sample App version : " + Version);
|
||||
System.out.println("Copyright (c) 2008 Seclore Technology Pvt. Ltd.");
|
||||
}
|
||||
}
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue