1. Introduction

This guide covers the technical implementation for integrating an Enterprise Application with Seclore Online — including key concepts, communication flows, security (proof keys), API specifications, and design considerations. It is intended for technical architects and development teams.

Readers are expected to have hands-on knowledge of RESTful web services and JSON, and an understanding of how files move in and out of the enterprise application being integrated.

2. Implementation Details

2.1 Key Concepts

File Token

A File Token is a unique string that represents a specific file in the enterprise application. Seclore Online includes the file token in all requests back to the enterprise application, allowing the host to locate the file.

A File Token must represent a single file and be URL-safe (tokens are passed in URLs).

Access Token

A string used by the enterprise application to determine the identity and permissions of the issuer of a request. The enterprise application provides an access token; Seclore Online passes it back on subsequent requests for validation.

Access tokens must:

Access Token TTL

The access_token_ttl property specifies when an access token expires, expressed as milliseconds since January 1, 1970 UTC — an absolute timestamp, not a duration. It is always paired with a specific access token.

File Hash

During file opening, Seclore Online stores the file contents and its hash. If a subsequent open request arrives with the same hash, Seclore Online reuses the cached contents instead of calling getFile again.

Session Context

A property the enterprise application generates to store session-related data. Once sent to Seclore Online, this data is echoed back in all subsequent requests.

Cloud File Access on Desktop (CFAD)

Seclore Online can open files natively using the Seclore Desktop Client on the user's machine. After editing, the file is saved back to the enterprise application. Technical details are in Section 5.3.

Discovery

The process by which an enterprise application obtains proof keys, supported versions, and features from Seclore Online. Cache the discovery response and refresh it every 12–24 hours, or re-run it when proof key validation fails (indicating keys may have been rotated).

2.2 Communication Flows

Solid arrows = requests  ·  Dashed arrows = responses

Flow A — File Open in View Mode, Switched to Edit

User Enterprise Application Seclore Online 1. Access file 2. Pre-flight check Supported ✓ 3. Redirect to Open endpoint 4. checkFile view mode, allow-edit: true 5. getFile File contents 6. File opens in view mode — User switches to Edit mode — 7. Click "Edit" 8. initEdit OK 9. edit endpoint EA re-calls Open → checkFile (edit) → getFile 10. File opens in edit mode

Flow B — File Open with Save-back

User Enterprise Application Seclore Online 1. Access file 2. Pre-flight check Supported ✓ 3. Redirect to Open endpoint 4. checkFile File metadata 5. getFile File contents 6. File opens in browser — User interactions — 7. Open event (auto, on file open) 8. putFile (on user save) 9. Close event (on user close)

Flow C — File Open via CFAD (Cloud File Access on Desktop)

User Enterprise Application Seclore Online Desktop Client 1. Access file 2. Pre-flight check Supported ✓ 3. Redirect to Open endpoint 4. Redirect to Desktop Client — Desktop Client takes over — 5. checkFile 6. initEdit OK 7. checkFile (file details) File metadata 8. getFile 9. getFile (proxy) File contents File contents 10. Opens file natively Open event → putFile (on user save) → Close event — all sent SO → EA

2.3 Integrity & Proof Keys

Discovering Proof Keys

The Discovery endpoint returns proof keys used to sign and verify all requests between Seclore Online and the enterprise application. Cache the response and refresh every 12–24 hours, or re-run discovery when proof key validation fails.

Proof Validation and Rollover

Seclore Online signs every request with a private key. The corresponding public key is in the proof-key field of the discovery response, sent via X-Seclore-Proof and X-Seclore-ProofOld HTTP headers.

To verify a request, check these three combinations in order — if any one passes, the request is authentic:

If none of the three passes, return 500 Internal Server Error.

Building the expected proof (Java):

private static byte[] getExpectedProofBytes(String pUrl, String pAccessToken, String pTimestamp) {
    final byte[] accessTokenBytes = pAccessToken.getBytes(StandardCharsets.UTF_8);
    final byte[] hostUrlBytes = pUrl.toUpperCase().getBytes(StandardCharsets.UTF_8);
    final Long timestamp = Long.valueOf(pTimestamp);
    final ByteBuffer byteBuffer = ByteBuffer.allocate(
        4 + accessTokenBytes.length + 4 + hostUrlBytes.length + 4 + 8);
    byteBuffer.putInt(accessTokenBytes.length);
    byteBuffer.put(accessTokenBytes);
    byteBuffer.putInt(hostUrlBytes.length);
    byteBuffer.put(hostUrlBytes);
    byteBuffer.putInt(8);
    byteBuffer.putLong(timestamp);
    return byteBuffer.array();
}

Verifying the proof (Java):

public static boolean verifyProofKey(String strModulus, String strExponent,
        String strProofKey, byte[] expectedProofArray) throws Exception {
    PublicKey publicKey = getPublicKey(strModulus, strExponent);
    Signature verifier = Signature.getInstance("SHA256withRSA");
    verifier.initVerify(publicKey);
    verifier.update(expectedProofArray);
    final byte[] signedProof = DatatypeConverter.parseBase64Binary(strProofKey);
    return verifier.verify(signedProof);
}

Renew Access Token

When an access token expires, the enterprise application must return 401. Seclore Online then calls the Renew Access Token endpoint with the expired token. The enterprise application validates it and returns a new token, which Seclore Online uses to retry the failed request.

3. Configurations

Whitelist Enterprise Application URL in Seclore Online

To open protected files using Seclore Online, the enterprise application URL must be whitelisted. Without this, Seclore Online will reject all requests from the application. One Seclore Online instance supports multiple whitelisted applications.

Configure the URL following the Seclore Online Installation Manual, then restart Seclore Online for changes to take effect.

4. Design Considerations

Failed Access Token Renewal

If an access token has expired, return 401. Seclore Online calls Renew Access Token with the expired token, and the enterprise application should respond with a new token. Seclore Online retries the original request using the renewed token.

Error URL Framework

Seclore Online returns an error-url in the response header for any exception. The integrating application can redirect to this URL to display contextual Seclore Online error pages (e.g. "file too large to open online", "unsupported extension"), or render a custom error page instead. See Section 5.2 for technical details.

Version Conflict Resolution

When multiple users attempt to edit and save the same file simultaneously, the enterprise application must handle version conflicts. Possible strategies:

5. APIs & Technical Details

Headers repeated across most APIs are documented in the Header Appendix.

5.1 Seclore Online Endpoints

Prefix the Seclore Online base URL to the paths below.

GET /seclore/discovery  — Discovery

Returns proof keys enabling secure communication between Seclore Online and the enterprise application.

Request Headers

HeaderRequiredDescription
X-Request-IdOptionalUnique request identifier for logging.

Success Response — 200

{
  "proof-keys": {
    "old": { "proof-key": { "modulus": "<BASE64>", "exponent": "<BASE64>", "algo": "SHA256withRSA" } },
    "new": { "proof-key": { "modulus": "<BASE64>", "exponent": "<BASE64>", "algo": "SHA256withRSA" } }
  },
  "versions": [1.0],
  "supported-features": [1.0]
}
FieldDescription
proof-keys.oldKey that was previously "new" and has since been rotated.
proof-keys.newCurrent active proof key after the latest rollover.
modulus / exponentBase64-encoded RSA key components.
algoSigning algorithm — currently SHA256withRSA.
versionsSupported API versions. Currently [1.0].
supported-features1.0 = CFAD (native file open) is supported.

Error Response — 500

Headers: X-Seclore-ErrorCode, X-Seclore-ErrorMsg, X-Seclore-ErrorURL (optional), X-Request-Id.

GET /seclore/1.0/files/preflight  — Pre-flight Check

Checks whether a file can be opened by Seclore Online (online or natively), based on extension and file size.

Request Headers

HeaderRequired
X-Seclore-PolicyServerURLMandatory
X-Request-IdOptional

Query Parameters

ParameterDescription
nameFull file name including extension. Use .html for HTML-wrapped files (e.g. sample.docx.html).
sizeFile size in bytes.
agentless0 = native open check; 1 = online open check.

Success Response — 200

{ "allowed-action": [ "view" | "edit" ] }

Error Response — 500

Headers: X-Seclore-ErrorCode, X-Seclore-ErrorMsg, X-Seclore-ErrorURL (optional), X-Request-Id.

POST /seclore/1.0/files/open  — Open

Browser redirect after a successful pre-flight. Initiates file opening in the browser or via native desktop client.

Form Parameters

ParameterDescription
accessTokenAccess token issued by the enterprise application for this specific file.
accessTokenExpiryExpiry time in milliseconds since January 1, 1970 UTC.
fileTokenUnique string representing the file being opened.
serviceUrlEnterprise application base URL. Seclore Online constructs endpoint URLs relative to this.
agentless0 = native (CFAD); 1 = online.
policyServerURLPolicy Server URL that protected the file.
sessionContextSession-specific data. Mandatory — pass any random string if none needed.
requestIdRequest ID for logging.

Success: File opens in browser or Desktop Client.  Error: Error page shown by Seclore Online.

5.2 Seclore Online Error Framework

POST {X-Seclore-ErrorURL}  — Error Page

The full URL is returned in the X-Seclore-ErrorURL response header. Redirecting to this URL displays a contextual Seclore Online error page, which may include secondary actions (e.g. download the file locally when it is too large to open online).

Form Parameters

ParameterRequiredDescription
accessTokenMandatoryAccess token for the file.
fileTokenMandatoryUnique file identifier.
serviceURLMandatoryEnterprise application base URL.
requestIdMandatoryRequest ID for logging.
sessionContextOptionalSession-specific data.

5.3 Enterprise Application Endpoints

Implement these endpoints in your enterprise application. Prefix the service URL to the paths below.

GET /seclore/1.0/files/{fileToken}  — Check File

Returns file metadata required by Seclore Online to open the file.

Request Headers

HeaderRequired
Content-Type: application/json; charset=utf-8Mandatory
AuthorizationMandatory
X-Seclore-TimeStampMandatory
X-Seclore-ProofMandatory
X-Seclore-ProofOldMandatory
X-Seclore-SessionContextOptional
X-Request-Id, X-RequestingAppName, X-RequestingAppVersionOptional

Success Response — 200

{
  "file-name": "string",
  "file-hash": "string",
  "file-hash-algo": "string",
  "file-size": "string",
  "options": {
    "allow-edit": boolean,
    "allow-download": boolean,
    "allow-unprotected-download": 0 | 1,
    "email-copy": boolean,
    "allow-saveback": boolean
  },
  "allowed-action": [ "view" | "edit" ]
}
FieldDescription
file-nameFull file name with extension.
file-hashFile hash. If it matches Seclore Online's stored hash, getFile is skipped.
file-hash-algoAlgorithm used to compute the hash.
file-sizeFile size in bytes.
options.allow-editShow edit button in view mode. Ignored if allowed-action is already edit.
options.allow-downloadAllow downloading a protected copy.
options.allow-unprotected-download0 = deny, 1 = allow unprotected download.
options.email-copyEmail an edited copy to the user on close.
options.allow-savebackAllow saving the edited file back to the enterprise application.
allowed-actionview or edit — the mode in which the file opens.
Seclore Online intersects these settings with Seclore permissions. For example, if allowed-action is edit but the user lacks Seclore edit permission, the file opens in view mode.

Error Response — 400, 401, 500

Headers: X-Seclore-ErrorCode, X-Seclore-ErrorMsg, X-Seclore-ErrorURL (optional).

GET /seclore/1.0/files/{fileToken}/contents  — Get File

Returns the actual file contents to Seclore Online.

Request Headers

HeaderRequired
AuthorizationMandatory
Content-DispositionMandatory
X-Seclore-TimeStamp, X-Seclore-Proof, X-Seclore-ProofOld, X-Seclore-FileHashMandatory
X-Seclore-SessionContext, X-Request-Id, X-RequestingAppName, X-RequestingAppVersionOptional

Success Response — 200

Headers: Content-Type: application/octet-stream, Content-Disposition (mandatory), X-Seclore-FileName (mandatory), X-Seclore-SessionContext (optional).
Body: binary file contents.

Error Response — 400, 401, 500

Headers: X-Seclore-ErrorCode, X-Seclore-ErrorMsg, X-Seclore-ErrorURL (optional).

GET /seclore/1.0/files/{fileToken}/download  — Download File

Returns the file contents when the user downloads a protected copy from the Seclore Online error page.

Request headers and success/error response are identical to Get File above.

POST /seclore/1.0/files/{fileToken}/contents  — Put File

Used by Seclore Online to save back the edited file to the enterprise application.

Request Headers

HeaderRequired
Authorization, X-Seclore-TimeStamp, X-Seclore-Proof, X-Seclore-ProofOld, Content-LengthMandatory
SAVE_EVENT_MODEMandatoryManual or Automatic
X-Seclore-SessionContextOptional

Request body: binary file contents.

Success Response — 200

Headers: Content-Type: application/octet-stream, X-Seclore-SessionContext (optional).

Error Response — 400, 401, 500

Headers: X-Seclore-ErrorCode, X-Seclore-ErrorMsg, X-Seclore-ErrorURL (optional).

POST /seclore/1.0/files/{fileToken}/initedit  — Init Edit

Called by Seclore Online when the user wants to switch from view to edit mode. Checks whether the file can be opened for editing.

Request headers: Authorization, X-Seclore-TimeStamp, X-Seclore-Proof, X-Seclore-ProofOld (all mandatory), plus optional headers.

Success (200): X-Seclore-SessionContext (optional).  Error (400, 401, 500): X-Seclore-ErrorCode, X-Seclore-ErrorMsg.

POST /seclore/1.0/files/{fileToken}/edit  — Edit

Called by Seclore Online after a successful initEdit. This endpoint must then call Seclore Online's open endpoint to open the file in edit mode.

Form Parameters

ParameterRequiredDescription
accessTokenMandatoryAccess token for the file.
fileTokenMandatoryUnique file identifier.
sessionContextOptionalSession-specific data.
requestIDOptionalRequest ID for logging.
POST /seclore/1.0/renewToken  — Renew Access Token

Called by Seclore Online when it receives a 401. Returns a renewed access token.

Request headers: Authorization (expired token), X-Seclore-TimeStamp, X-Seclore-Proof, X-Seclore-ProofOld (all mandatory).

Success Response — 200

{ "access-token": "string", "access-token-ttl": 1680000000000 }

access-token-ttl is milliseconds since January 1, 1970 UTC (absolute timestamp, not duration).

Error Response — 400, 401, 500

Headers: X-Seclore-ErrorCode, X-Seclore-ErrorMsg.

POST /seclore/1.0/files/{fileToken}/events/open  — Open Event

Sent by Seclore Online when the user opens the file.

Request headers: Content-Type: application/json, Authorization, X-Seclore-TimeStamp, X-Seclore-Proof, X-Seclore-ProofOld (all mandatory).

{ "actual-allowed-action": "view" | "edit" }

Success (200)  |  Error (400, 401, 500, 501): X-Seclore-ErrorCode, X-Seclore-ErrorMsg.

POST /seclore/1.0/files/{fileToken}/events/close  — Close Event

Sent by Seclore Online when the user closes the file.

Request headers: same as Open Event.

{ "mode": "manual" | "automatic" }

manual — user explicitly closed.  automatic — auto-closed by the system.

Success (200)  |  Error (400, 401, 500, 501): X-Seclore-ErrorCode, X-Seclore-ErrorMsg.

5.4 Status Code Appendix

CodeNameDescription
200OKRequest was successful.
401UnauthorizedAccess token has expired or is invalid.
404Not FoundRequested resource not found.
500Internal Server ErrorInternal server error.
501Not ImplementedThe requested method is not implemented.

5.5 Header Appendix

HeaderTypeDescription
X-Request-IdStringUnique request identifier for logging.
AuthorizationStringAccess token. Value must be prefixed with Bearer <token>.
X-RequestingAppNameStringName of the requesting application.
X-RequestingAppVersionStringVersion of the requesting application.
X-Seclore-TimeStampNumber100-nanosecond intervals elapsed since 12:00:00 midnight, January 1, 0001 UTC.
X-Seclore-ProofStringData signed using the new proof key from discovery.
X-Seclore-ProofOldStringData signed using the old proof key from discovery.
X-Seclore-PolicyServerURLStringComma-separated Policy Server URL(s) that protected the file.
X-Seclore-SessionContextStringSession context. Enterprise application sends in requests; Seclore Online echoes updated value in subsequent requests.
user-agentStringOptional. User agent opening the file.
X-Seclore-FileHashStringHash of the file sent in the request body.
X-Seclore-FileNameStringFile name.
Content-DispositionStringStandard HTTP header with file name as attachment.
Content-LengthNumberFile size in bytes.
Content-TypeStringStandard HTTP content type header.
SAVE_EVENT_MODEStringManual — user saved. Automatic — auto-saved.
X-Seclore-ErrorCodeNumberError code in case of an error.
X-Seclore-ErrorMsgStringError message in case of an error.
X-Seclore-ErrorURLStringRedirect the user to this URL to show a Seclore Online error screen.

6. FAQs

General integration FAQs are on the FAQs page.

How do I configure a new Policy Server URL?

One Seclore Online instance supports multiple Policy Servers. To add one:

  1. Configure the PS URL in your enterprise application to send it as a header and parameter in requests wherever expected.
  2. Whitelist the PS URL in Seclore Online following the Seclore Online Installation Manual.
  3. Restart Seclore Online for changes to take effect.

7. Glossary

TermDefinition
Policy ServerThe command-and-control center of the Seclore system. Manages usage policies, user permissions, protected files, and activity logs.
Seclore OnlineSeclore component for accessing protected files in a browser without installing any local agent.
Enterprise ApplicationApplications (DMS, CMS, EFSS, SAP, etc.) integrated with Seclore to apply data-centric security to downloaded files and extracts.
UserPerson who interacts with the enterprise application and needs to view or edit data moving outside of it.
Protected ContentData or files encrypted with Seclore.
AgentSoftware installed on a user's machine to access Seclore-protected files outside of Seclore Online.