Infisical / infisical

♾ Infisical is the open-source secret management platform: Sync secrets across your team/infrastructure, prevent secret leaks, and manage internal PKI
https://infisical.com
Other
14.97k stars 842 forks source link

Infisical PHP SDK #531

Closed dangtony98 closed 2 months ago

dangtony98 commented 1 year ago

Currently Infisical has Node and Python SDKs that enables users to install packages into their apps to fetch back and access their secrets.

It would be great to have a mirror PHP SDK that does the same for PHP users.

Why would it be useful? This would help PHP users more easily connect their apps to Infisical.

Additional context Feel free to help out and join the Slack community.

mistial-dev commented 1 year ago

What kind of functionality would be required for this issue? Would it need feature parity with the Node/Python SDKs?

Is there existing code that has been written that a submission would clobber?

mistial-dev commented 1 year ago

Looking through the python client, there seems to be:

I see a few other APIs in the reference that might be useful, namely "Get Versions" and "Roll Back to Version".

Replicating the symmetric functionality would likely best be done with defuse/php-encryption, which uses OpenSSL as its backing library (and is generally present in hosted environments and standard PHP installs).

API calls could be handled through curl (which is not as universal), or through file_get_contents to a URL with post data (which is fairly universally supported).

dangtony98 commented 1 year ago

Hey @mistial-dev!

That's right — These methods would need to be mirrored for a PHP SDK.

That said, we're re-thinking some logistics for standardizing SDKs at the moment, so I would hold off on any implementation. More specifically, we're thinking to create a single implementation binary via Go/Rust and develop SDK wrappers across all languages atop this implementation.

Haven't looked into it further yet but this is the current thought process (I'd expect to start working on this sometime next quarter).

mistial-dev commented 1 year ago

I'll hold off on submitting anything then.

I need .NET and PHP for some projects I'm working on. While .NET can tolerate executable plugins, for most situations in which PHP is used, requiring binary code won't work. Not only is there so many different architectures, they are often very locked down.

If the goal for PHP is to get people using the cloud service in particular, and to keep secrets out of managed/shared hosting as much as they reasonably can, a binary plugin is going to be very counterproductive.

akhilmhdh commented 2 months ago

Closing as its for sdk directory