Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add mTLS support via clientCertSource client option #325

Merged
merged 22 commits into from
Aug 20, 2021

Conversation

bshaffer
Copy link
Contributor

@bshaffer bshaffer commented Jun 1, 2021

  • Adds client option clientCertSource
  • Adds support for client certs to all three transports
  • Verified calls to mTLS endpoint works locally

Usage

use Google\Cloud\PubSub\V1\PublisherClient;

$projectId = 'YOUR_PROJECT_ID';
$pubsub = new PublisherClient([
    'apiEndpoint' => 'pubsub.mtls.googleapis.com',
    'clientCertSource' => function () { 
         return file_get_contents(__DIR__ . '/cert.pem');
    },
]);

$topics = $pubsub->listTopics('projects/' . $projectId);

TODO

@bshaffer bshaffer requested a review from a team as a code owner June 1, 2021 18:08
@google-cla google-cla bot added the cla: yes This human has signed the Contributor License Agreement. label Jun 1, 2021
composer.json Outdated Show resolved Hide resolved
@bshaffer bshaffer added the do not merge Indicates a pull request not ready for merge, due to either quality or timing. label Jul 9, 2021
@bshaffer bshaffer removed the do not merge Indicates a pull request not ready for merge, due to either quality or timing. label Aug 17, 2021
@bshaffer bshaffer added the automerge Merge the pull request once unit tests and other checks pass. label Aug 20, 2021
@bshaffer bshaffer mentioned this pull request Aug 20, 2021
@gcf-merge-on-green gcf-merge-on-green bot merged commit 50ed366 into master Aug 20, 2021
@gcf-merge-on-green gcf-merge-on-green bot deleted the mtls branch August 20, 2021 23:38
@gcf-merge-on-green gcf-merge-on-green bot removed the automerge Merge the pull request once unit tests and other checks pass. label Aug 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla: yes This human has signed the Contributor License Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants