Closed dangtony98 closed 2 months 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?
Looking through the python client, there seems to be:
get_all_secrets (environment, path)
get_secret (name, type, environment, path)
create_secret (name, value, type, environment, path)
update_secret (name, value, type, environment, path)
delete_secret (name, type, environment, path)
create_symmetric_key ()
encrypt_symmetric (plaintext, key)
decrypt_symmetric (ciphertext, key, iv, tag)
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).
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).
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.
Closing as its for sdk directory
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.