Skip to content

Enable RBAC support + sorted hashes - #50

Open
cc32d9 wants to merge 7 commits into
mnunberg:masterfrom
cc32d9:master
Open

Enable RBAC support + sorted hashes#50
cc32d9 wants to merge 7 commits into
mnunberg:masterfrom
cc32d9:master

Conversation

@cc32d9

@cc32d9 cc32d9 commented Jul 23, 2019

Copy link
Copy Markdown

This PR sets "canonical" mode in JSON encoder, so that all documents are created with sorted hashes. Otherwise Perl randomizes them and they are difficult to analyze.

Also this PR embraces Annibale's RBAC support.

x-hannibal and others added 7 commits April 17, 2018 00:06
This patch enables the RBAC (Role Based Access Control) introduced from Couchbase Server 4.5.

```
--- xs/Couchbase.xs.orig	Mon Jul 23 23:41:36 2018
+++ xs/Couchbase.xs	Mon Jul 23 23:42:10 2018
@@ -36,6 +36,7 @@ PLCB_construct(const char *pkg, HV *hvopts)
     PLCB_t *object;
     plcb_OPTION options[] = {
         PLCB_KWARG("connstr", CSTRING, &cr_opts.v.v3.connstr),
+        PLCB_KWARG("username", CSTRING, &cr_opts.v.v3.username),
         PLCB_KWARG("password", CSTRING, &cr_opts.v.v3.passwd),
         PLCB_KWARG("io", SV, &iops_impl),
         PLCB_KWARG("on_connect", CV, &conncb),
```

Synopsis

The xs/Couchbase.xs is already patched in this commit.
Just compile and install as usual:

 perl Makerfile.PL
 make
 make install

Contributors

ABS      - https://github.com/abiscuola
Hannibal - https://github.com/annibale-x
This patch enables the RBAC (Role Based Access Control) introduced from Couchbase Server 4.5.

--- xs/Couchbase.xs.orig	Mon Jul 23 23:41:36 2018
+++ xs/Couchbase.xs	Mon Jul 23 23:42:10 2018
@@ -36,6 +36,7 @@ PLCB_construct(const char *pkg, HV *hvopts)
     PLCB_t *object;
     plcb_OPTION options[] = {
         PLCB_KWARG("connstr", CSTRING, &cr_opts.v.v3.connstr),
+        PLCB_KWARG("username", CSTRING, &cr_opts.v.v3.username),
         PLCB_KWARG("password", CSTRING, &cr_opts.v.v3.passwd),
         PLCB_KWARG("io", SV, &iops_impl),
         PLCB_KWARG("on_connect", CV, &conncb),

INSTALLATION

The xs/Couchbase.xs is already patched in this commit.
Just compile and install the Perl module as usual:

 perl Makerfile.PL
 make
 make install

NOTES

POD updated (only Couchbase/Bucket.pm)

CONTRIBUTORS

Andrea ABS - https://github.com/abiscuola
Hannibal   - https://github.com/annibale-x
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants