Coder Social home page Coder Social logo

vault-php's People

Contributors

aapokiiso avatar babeuloula avatar besir avatar cmlara avatar csharpru avatar dependabot[bot] avatar gosunilgo avatar grebenschikov avatar hexa2k9 avatar jimymodi avatar marcusirgens avatar mkrauser avatar nicksantamaria avatar qem19 avatar ruleant avatar samktulho avatar sdrobov avatar settermjd avatar slitviachenko avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

vault-php's Issues

Use mock of Vault instead real one in tests

Right now tests will run only if you have VCR prepared or real initialised Vault, but that is not acceptable for unit testing. We need to replace real Vault usage with mock.

[Question] "Zend/Diactoros" has been abandoned 2019-12-31

Hi,

I have seen that the examples & tests given are using "Zend/Diactoros" which has been abandoned 2019-12-31.
The repo has been moved to "laminas/laminas-diactoros".

Are there already any tests replacing "Zend/Diactoros" with "laminas/laminas-diactoros"?

Do you still recommend to use "Zend/Diactoros"?

Can not find the Guzzle6Transport class

When I call the new Client(new Guzzle6Transport()), there is an error that can not find Guzzle6Transport class
so I have to download the composer require csharpru/vault-php-guzzle6-transport manually.

Make doctrine/inflector constraint less strict.

I'm unable to install this library in a Drupal 8.5.x application as there is a conflict on the dependency doctrine/inflector.

Changing the version constraint from ~1.1.0 to ~1.1 resolves this issue for me.

I can see this was intentionally set in this commit - b7fc83d

Is there a specific issue which necessitated this? If so, is it a bug that can be resolved in this library?

"doctrine/inflector": "~1.1.0",

working example

Can you please provide a smallest working example which fetches a single secret from vault? I see the docs currently cover everything up to connecting with a vault as a client, but I don't see how they actually query.

PHP8 Support

Hi, currently when installing on PHP8 I get this error:
Screenshot 2021-02-20 at 14 02 39

Would it be possible to add PHP8 support?

Support Vault KV2

Vault KV2 expects the JSON Body to be formed as documented here:
https://www.vaultproject.io/api/secret/kv/kv-v2.html#data

We should consider providing an optional parameter that defines the kv version used.

I'm gonna provide a PR.

Update:
I probpably won't provide a PR :)

Did a workaround in the AbstractionClass, i.e.:

     * @param string $path
     * @param array $secrets
     * @return bool
     */
    public function put(string $path, array $secrets): bool
    {
        try {
            $secrets = ['data' => $secrets];
            $result = $this->client->write($path, $secrets);
...

How long until it is stable?

The warning in the README.txt is from August of 2017. Is it still an unstable project? Or is it there a RC planned?

Add default transport

Right now we're using Guzzle 5 and Guzzle 6 transports.

Due to that decision you cannot run tests without installation of Guzzle 6 transport and PHP >= 5.5, so we need to implement default transport that will be compatible with 5.3 and above, so that you don't need to install transport if you don't want to.

LeaseTrait leaseId should be a string not int

Currently LeaseTrait::$leaseId is an 'int|null' and LeaseTrait::getLeaseId() return an integer or null.

An example of the response on $client->read() for $leaseId against the AWS vault backend shows a string of aws/creds/test/QALQZOlBOnl5LsFReqohr7gl which when calling getLease() causes a TypeError NOTICE: PHP message: TypeError: Vault\ResponseModels\Response::getLeaseId(): Return value must be of type ?int, string returned in /var/www/html/vendor/csharpru/vault-php/src/ResponseModels/Traits/LeaseTrait.php on line 32

https://www.vaultproject.io/api-docs/system/leases also appears to indicate this should be a string.

{
  "id": "auth/token/create/25c75065466dfc5f920525feafe47502c4c9915c",
  "issue_time": "2017-04-30T10:18:11.228946471-04:00",
  "expire_time": "2017-04-30T11:18:11.228946708-04:00",
  "last_renewal_time": null,
  "renewable": true,
  "ttl": 3558
}

Update doctrine / inflector

Hi,
We can't install a dependency which use this project because we have another dependency which use the latest version of doctrine/inflector.

I see this project use a strict version (~1.1) of doctrine/inflector. In #14 it is said that there was a bug at this time.

Is there any plan to test with the new version (1.3.1) and maybe update it ?

Transport folder missing after composer require

I don't know enough about Composer to know if this is an issue with your repo or an issue with composer, but when I do a composer require for your project, the "transports" folder is missing. Which is of course causing an error when the guzzle6transport file tries to call it:

"PHP Fatal error: Uncaught Error: Interface 'Vault\Transports\Transport' not found"

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.