Client for the Tenant Security Proxy in PHP

Overview

Latest Stable Version PHP CI License

Tenant Security Client PHP Library

A PHP client for implementing CMK within a vendor's infrastructure. Makes requests through an IronCore Tenant Security Proxy to tenants' KMS/logging infrastructures.

This project is still in very early stages, but will eventually implement everything that is in our Java and Node sdks.

Getting started

A good place to start is the TenantSecurityClient class, which is what the consumer should always interact with. You can also go check out the examples.

If you're looking for more examples the usage is very similar to that shown in our Java Examples.

Documentation

We generate documentation for this library using PHPDoc and publish it to https://ironcorelabs.github.io/tenant-security-client-php/.

Design Choices

Error handling

Functions which can error may throw TenantSecurityException to indicate that they've failed.

Http and Aes library choices

This library uses CURL for http requests and OpenSSL for AES encryption/decryption.

Copyright (c) 2021 IronCore Labs, Inc. All rights reserved.

Comments
  • Add batchEncrypt, batchDecrypt, and logSecurityEvent functions

    Add batchEncrypt, batchDecrypt, and logSecurityEvent functions

    Brings this SDK close to parity with tenant-security-client-java and tenant-security-client-nodejs (we aren't able to add streaming support with our current encryption using openssl_encrypt).

    The example won't work until this has been published, as it depends on tsc-php v0.2.2

    TODO:

    • [x] lint
    opened by giarc3 1
  • Add re-key function to TenantSecurityClient

    Add re-key function to TenantSecurityClient

    Takes an EDEK, a new tenant ID, and request metadata. Makes a call to the TSP to re-key the EDEK to the new tenant, then returns the new EDEK to be stored off.

    Also added a new example that shows encrypting to one tenant, re-keying to a new tenant, then decrypting the untouched data using the new tenant.

    opened by giarc3 1
  • Increase code coverage

    Increase code coverage

    This adds tests for all functions and lines on all classes other than ones that have to talk to a TSP (mainly TenantSecurityRequest and TenantSecurityClient). The one exception is an Exception in Aes::encrypt that could possibly only get thrown on different systems. We could consider some sort of abstract class or possibly mocking to be able to test the functions that rely on curl.

    This will put us above the 80% threshold for CI

    opened by giarc3 1
  • Invalid TSP request when EventMetadata.timestampMillis is null

    Invalid TSP request when EventMetadata.timestampMillis is null

    timestampMillis is an optional parameter to EventMetadata (defaulting to null if not passed), but the TSP requires it to be present on the logSecurityEvent endpoint. In our other repos, EventMetadata will use the current time if null is passed, so we need to do the same here.

    bug 
    opened by giarc3 0
  • Minor CI changes

    Minor CI changes

    • Put linting into a separate job (doesn't need to run on every PHP version and makes it more obvious when the tests passed but linting failed).
    • Switched to using ubuntu-20.04 (this is our standard in our other repos)
    • Changed triggers to include all pull requests (even if they're going to a feature branch, for instance)
    opened by giarc3 0
  • Support encrypt of PlaintextDocument using existing EDEK

    Support encrypt of PlaintextDocument using existing EDEK

    We are currently missing the encrypt function that takes an existing edek to use.

    This function is here in java. We should add it in this sdk as well to allow for the usecase where someone wants to share an edek across many calls to encrypt.

    In node we call this encryptWithExistingKey.

    opened by coltfred 0
Owner
IronCore Labs
The toolset for cloud trust
IronCore Labs
PHP JSON-RPC 2.0 Server/Client Implementation with Automatic Client Class Generation via SMD

PHP JSON-RPC 2.0 Server/Client Implementation with Automatic Client Class Generation via SMD

Sergey Bykov 63 Feb 14, 2022
OpenAI API Client is a component-oriented, extensible client library for the OpenAI API. It's designed to be faster and more memory efficient than traditional PHP libraries.

OpenAI API Client in PHP (community-maintained) This library is a component-oriented, extensible client library for the OpenAI API. It's designed to b

Mounir R'Quiba 6 Jun 14, 2023
⚡️ Web3 PHP is a supercharged PHP API client that allows you to interact with a generic Ethereum RPC.

Web3 PHP is a supercharged PHP API client that allows you to interact with a generic Ethereum RPC. This project is a work-in-progress. Code and docume

Web3 PHP 665 Dec 23, 2022
A simple PHP GitHub API client, Object Oriented, tested and documented.

PHP GitHub API A simple Object Oriented wrapper for GitHub API, written with PHP. Uses GitHub API v3 & supports GitHub API v4. The object API (v3) is

KNP Labs 2k Jan 7, 2023
A simple Object Oriented PHP Client for Termii SMS API

Termii Client A simple Object Oriented PHP Client for Termii SMS API. Uses Termii API. Requirements PHP >= 7.2 Guzzlehttp ~6|~7 Installation Via Compo

Ilesanmi Olawale Adedotun 5 Feb 24, 2022
Xendit REST API Client for PHP - Card, Virtual Account, Invoice, Disbursement, Recurring Payments, Payout, EWallet, Balance, Retail Outlets Services

Xendit REST API Client for PHP - Card, Virtual Account, Invoice, Disbursement, Recurring Payments, Payout, EWallet, Balance, Retail Outlets Services

Xendit 96 Jan 6, 2023
PHP client for Kafka

A library to allow people to communicate to Kafka using plain PHP, compatible with Kafka v0.11+ (due to the way the protocol works).

Luís Cobucci 52 Dec 23, 2022
php 8 client for the lemon.markets api

lemon.markets php client This repository contains a php 8+ compatible client for the https://lemon.markets API. The documentation of the API can be fo

Daniel Freudenberger 4 Nov 17, 2022
PHP client for Microsoft Azure Face API.

Microsoft Azure Face API PHP client A PHP library that utilizes Azure Face REST API. Requirements PHP >= 7.4 Installation composer require darmen/php-

Darmen Amanbayev 6 Sep 14, 2022
Google PHP API Client Services

Google PHP API Client Services

Google APIs 1.1k Dec 22, 2022
AltiriaSmsPhpClient, the official PHP client of Altiria

Altiria, cliente SMS PHP Altiria SMS PHP es un cliente que simplifica al máximo la integración de nuestro API para PHP. Por el momento, esta librería

Altiria 3 Dec 22, 2022
PHP Client for the GoFlink API

GoFlink PHP API Client This project is an unofficial library to communicate with the GoFlink API from your PHP project. Documentation about the API is

Rico Hageman 4 Oct 3, 2022
A PHP client for the official Kizeo Forms API V3+. 📌

Kizeo Forms API V3+ - PHP This is a Swagger generated doc for Kizeo REST API 3. You can find additionnal documentation here : Online documentation. Th

siapepfrance 1 Oct 26, 2021
Shopee Open API v2 Client build with php

Shopee PHP Client This is a Shopee PHP Client, currently supported for API V2 in ShopeeOpenPlatform Composer Install composer require haistar/shopee-p

ravimukti 17 Dec 27, 2022
The official Previewify.app PHP Client

Previewify for PHP This is the official Previewify client for PHP. Support us Like our work? You can support us by purchasing one of our products. Ins

Flowframe 6 Jan 19, 2022
Production-ready, stable Kafka client for PHP

PHP Kafka client - php-rdkafka PHP-rdkafka is a stable, production-ready, long term support, and fast Kafka client for PHP based on librdkafka. It sup

Arnaud Le Blanc 1.9k Dec 26, 2022
VideoColor PHP Search Client

This library is designed to find information about a movie and get the frame position using a screenshot from a video.

null 3 Oct 9, 2022
GitLab PHP API Client

GitLab PHP API Client We present a modern GitLab API v4 client for PHP. This is strongly based on php-github-api by KnpLabs. With this in mind, we now

 PHP GitLab API 868 Dec 30, 2022
Nexmo REST API client for PHP. API support for SMS, Voice, Text-to-Speech, Numbers, Verify (2FA) and more.

Client Library for PHP Support Notice This library and it's associated packages, nexmo/client and nexmo/client-core have transitioned into a "Maintena

Nexmo 75 Sep 23, 2022