Skip to content

How to Authenticate PrivateKey file data from DB instead on Physical Private key by passing Path. #236

@BPKReddy

Description

@BPKReddy

I'm trying to connect "OCI Object Storage" from .Net Application. Currently able to connect with providing PrivateKey file path and "PrivateKey File" available in Physical path. All other values are coming from the Database.

Due to security reasons, I cannot have a physical "PrivateKey" file on the server. Need to maintain PrivateKey file content also in the Database and Authenticate. I'm fine with storing PrivateKey file content as a string in DB or storing "PrivateKey file" as BLOB. Then read "PrivateKey" from DB and build SimpleAuthenticationDetailsProvider object.

please suggest me how can I read "PrivateKey file content" from a Variable or File object.

var provider = new SimpleAuthenticationDetailsProvider
{
TenantId = "ocid1.tenancy",
UserId = "ocid1.user",
Fingerprint = "Fingerprint Value",
Region = Region.FromRegionId("us-ashburn-5"),
PrivateKeySupplier = new FilePrivateKeySupplier("C:\Pavan\PrivateKey\customer-3_2024-03-19T07_58_29.636Z.pem", new SecureString()),
};

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions