strongdm 3.5.5 → 3.6.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 05f597f5d34b2450a28bf04dffc2921eb8fd6a51b4e80ddf7967da4d4dca1522
4
- data.tar.gz: 0fbb02d96799b6fc07866ed9e62555be5ab7cf00b723ed7d95c9e26ed9fce4c3
3
+ metadata.gz: 0422edba8bf3e651e34ee80a04636820bf84c3091cf6ce57ea33ad4e0d554720
4
+ data.tar.gz: 803d2fece2c378b009e06da5676969a07fdf34ef8187dd0ebe65cc0412c102f7
5
5
  SHA512:
6
- metadata.gz: cf0903d086fa186201d64fdd22653f65bb677c8d9cb26e05a07fed4b08b5bb294b686b6a9c8414bf598f5b434c284c7aa9e07e0c7ca3d7d60679541ef21f2f78
7
- data.tar.gz: d68a6d9fe5a7676dcd31920c4ebf799abdc609d322e6fa5aa34efe293db1c78452d7ebbed9834544b22e003b9d98faec1f5fdef89be27eabcf23151e86795ddd
6
+ metadata.gz: 134fdc741aa68a757e732a3d51719fb4ad441593b52e4f39d3d015569f5f478d5bb44151602ff62c74f0c98bad99291ebc21fa7ca8c363cc068d6155360af82c
7
+ data.tar.gz: 9230544165b6e5a015170105f6edc97d323e8011421b828ea9007e52b60bb6d999b2c2546235a28bafc7f80aff4ec07a03dca5718734716396a8470bd22c3053
data/.git/ORIG_HEAD CHANGED
@@ -1 +1 @@
1
- 67d9309e77842e64a4b43d8c3fa2c52ece706a3d
1
+ 7f688fbda6c715ebd7f057720b4e16216ff54064
@@ -8,107 +8,166 @@ use IPC::Open2;
8
8
  # (https://facebook.github.io/watchman/) with git to speed up detecting
9
9
  # new and modified files.
10
10
  #
11
- # The hook is passed a version (currently 1) and a time in nanoseconds
12
- # formatted as a string and outputs to stdout all files that have been
13
- # modified since the given time. Paths must be relative to the root of
14
- # the working tree and separated by a single NUL.
11
+ # The hook is passed a version (currently 2) and last update token
12
+ # formatted as a string and outputs to stdout a new update token and
13
+ # all files that have been modified since the update token. Paths must
14
+ # be relative to the root of the working tree and separated by a single NUL.
15
15
  #
16
16
  # To enable this hook, rename this file to "query-watchman" and set
17
17
  # 'git config core.fsmonitor .git/hooks/query-watchman'
18
18
  #
19
- my ($version, $time) = @ARGV;
19
+ my ($version, $last_update_token) = @ARGV;
20
20
 
21
- # Check the hook interface version
21
+ # Uncomment for debugging
22
+ # print STDERR "$0 $version $last_update_token\n";
22
23
 
23
- if ($version == 1) {
24
- # convert nanoseconds to seconds
25
- $time = int $time / 1000000000;
26
- } else {
24
+ # Check the hook interface version
25
+ if ($version ne 2) {
27
26
  die "Unsupported query-fsmonitor hook version '$version'.\n" .
28
27
  "Falling back to scanning...\n";
29
28
  }
30
29
 
31
- my $git_work_tree;
32
- if ($^O =~ 'msys' || $^O =~ 'cygwin') {
33
- $git_work_tree = Win32::GetCwd();
34
- $git_work_tree =~ tr/\\/\//;
35
- } else {
36
- require Cwd;
37
- $git_work_tree = Cwd::cwd();
38
- }
30
+ my $git_work_tree = get_working_dir();
39
31
 
40
32
  my $retry = 1;
41
33
 
34
+ my $json_pkg;
35
+ eval {
36
+ require JSON::XS;
37
+ $json_pkg = "JSON::XS";
38
+ 1;
39
+ } or do {
40
+ require JSON::PP;
41
+ $json_pkg = "JSON::PP";
42
+ };
43
+
42
44
  launch_watchman();
43
45
 
44
46
  sub launch_watchman {
47
+ my $o = watchman_query();
48
+ if (is_work_tree_watched($o)) {
49
+ output_result($o->{clock}, @{$o->{files}});
50
+ }
51
+ }
52
+
53
+ sub output_result {
54
+ my ($clockid, @files) = @_;
45
55
 
56
+ # Uncomment for debugging watchman output
57
+ # open (my $fh, ">", ".git/watchman-output.out");
58
+ # binmode $fh, ":utf8";
59
+ # print $fh "$clockid\n@files\n";
60
+ # close $fh;
61
+
62
+ binmode STDOUT, ":utf8";
63
+ print $clockid;
64
+ print "\0";
65
+ local $, = "\0";
66
+ print @files;
67
+ }
68
+
69
+ sub watchman_clock {
70
+ my $response = qx/watchman clock "$git_work_tree"/;
71
+ die "Failed to get clock id on '$git_work_tree'.\n" .
72
+ "Falling back to scanning...\n" if $? != 0;
73
+
74
+ return $json_pkg->new->utf8->decode($response);
75
+ }
76
+
77
+ sub watchman_query {
46
78
  my $pid = open2(\*CHLD_OUT, \*CHLD_IN, 'watchman -j --no-pretty')
47
- or die "open2() failed: $!\n" .
48
- "Falling back to scanning...\n";
79
+ or die "open2() failed: $!\n" .
80
+ "Falling back to scanning...\n";
49
81
 
50
82
  # In the query expression below we're asking for names of files that
51
- # changed since $time but were not transient (ie created after
52
- # $time but no longer exist).
83
+ # changed since $last_update_token but not from the .git folder.
53
84
  #
54
85
  # To accomplish this, we're using the "since" generator to use the
55
86
  # recency index to select candidate nodes and "fields" to limit the
56
87
  # output to file names only. Then we're using the "expression" term to
57
88
  # further constrain the results.
58
- #
59
- # The category of transient files that we want to ignore will have a
60
- # creation clock (cclock) newer than $time_t value and will also not
61
- # currently exist.
62
-
89
+ if (substr($last_update_token, 0, 1) eq "c") {
90
+ $last_update_token = "\"$last_update_token\"";
91
+ }
63
92
  my $query = <<" END";
64
93
  ["query", "$git_work_tree", {
65
- "since": $time,
94
+ "since": $last_update_token,
66
95
  "fields": ["name"],
67
- "expression": ["not", ["allof", ["since", $time, "cclock"], ["not", "exists"]]]
96
+ "expression": ["not", ["dirname", ".git"]]
68
97
  }]
69
98
  END
70
99
 
100
+ # Uncomment for debugging the watchman query
101
+ # open (my $fh, ">", ".git/watchman-query.json");
102
+ # print $fh $query;
103
+ # close $fh;
104
+
71
105
  print CHLD_IN $query;
72
106
  close CHLD_IN;
73
107
  my $response = do {local $/; <CHLD_OUT>};
74
108
 
109
+ # Uncomment for debugging the watch response
110
+ # open ($fh, ">", ".git/watchman-response.json");
111
+ # print $fh $response;
112
+ # close $fh;
113
+
75
114
  die "Watchman: command returned no output.\n" .
76
- "Falling back to scanning...\n" if $response eq "";
115
+ "Falling back to scanning...\n" if $response eq "";
77
116
  die "Watchman: command returned invalid output: $response\n" .
78
- "Falling back to scanning...\n" unless $response =~ /^\{/;
79
-
80
- my $json_pkg;
81
- eval {
82
- require JSON::XS;
83
- $json_pkg = "JSON::XS";
84
- 1;
85
- } or do {
86
- require JSON::PP;
87
- $json_pkg = "JSON::PP";
88
- };
89
-
90
- my $o = $json_pkg->new->utf8->decode($response);
91
-
92
- if ($retry > 0 and $o->{error} and $o->{error} =~ m/unable to resolve root .* directory (.*) is not watched/) {
93
- print STDERR "Adding '$git_work_tree' to watchman's watch list.\n";
117
+ "Falling back to scanning...\n" unless $response =~ /^\{/;
118
+
119
+ return $json_pkg->new->utf8->decode($response);
120
+ }
121
+
122
+ sub is_work_tree_watched {
123
+ my ($output) = @_;
124
+ my $error = $output->{error};
125
+ if ($retry > 0 and $error and $error =~ m/unable to resolve root .* directory (.*) is not watched/) {
94
126
  $retry--;
95
- qx/watchman watch "$git_work_tree"/;
127
+ my $response = qx/watchman watch "$git_work_tree"/;
96
128
  die "Failed to make watchman watch '$git_work_tree'.\n" .
97
129
  "Falling back to scanning...\n" if $? != 0;
130
+ $output = $json_pkg->new->utf8->decode($response);
131
+ $error = $output->{error};
132
+ die "Watchman: $error.\n" .
133
+ "Falling back to scanning...\n" if $error;
134
+
135
+ # Uncomment for debugging watchman output
136
+ # open (my $fh, ">", ".git/watchman-output.out");
137
+ # close $fh;
98
138
 
99
139
  # Watchman will always return all files on the first query so
100
140
  # return the fast "everything is dirty" flag to git and do the
101
141
  # Watchman query just to get it over with now so we won't pay
102
142
  # the cost in git to look up each individual file.
103
- print "/\0";
143
+ my $o = watchman_clock();
144
+ $error = $output->{error};
145
+
146
+ die "Watchman: $error.\n" .
147
+ "Falling back to scanning...\n" if $error;
148
+
149
+ output_result($o->{clock}, ("/"));
150
+ $last_update_token = $o->{clock};
151
+
104
152
  eval { launch_watchman() };
105
- exit 0;
153
+ return 0;
106
154
  }
107
155
 
108
- die "Watchman: $o->{error}.\n" .
109
- "Falling back to scanning...\n" if $o->{error};
156
+ die "Watchman: $error.\n" .
157
+ "Falling back to scanning...\n" if $error;
110
158
 
111
- binmode STDOUT, ":utf8";
112
- local $, = "\0";
113
- print @{$o->{files}};
159
+ return 1;
160
+ }
161
+
162
+ sub get_working_dir {
163
+ my $working_dir;
164
+ if ($^O =~ 'msys' || $^O =~ 'cygwin') {
165
+ $working_dir = Win32::GetCwd();
166
+ $working_dir =~ tr/\\/\//;
167
+ } else {
168
+ require Cwd;
169
+ $working_dir = Cwd::cwd();
170
+ }
171
+
172
+ return $working_dir;
114
173
  }
@@ -12,11 +12,11 @@ then
12
12
  against=HEAD
13
13
  else
14
14
  # Initial commit: diff against an empty tree object
15
- against=4b825dc642cb6eb9a060e54bf8d69288fbee4904
15
+ against=$(git hash-object -t tree /dev/null)
16
16
  fi
17
17
 
18
18
  # If you want to allow non-ASCII filenames set this variable to true.
19
- allownonascii=$(git config --bool hooks.allownonascii)
19
+ allownonascii=$(git config --type=bool hooks.allownonascii)
20
20
 
21
21
  # Redirect output to stderr.
22
22
  exec 1>&2
@@ -0,0 +1,13 @@
1
+ #!/bin/sh
2
+ #
3
+ # An example hook script to verify what is about to be committed.
4
+ # Called by "git merge" with no arguments. The hook should
5
+ # exit with non-zero status after issuing an appropriate message to
6
+ # stderr if it wants to stop the merge commit.
7
+ #
8
+ # To enable this hook, rename this file to "pre-merge-commit".
9
+
10
+ . git-sh-setup
11
+ test -x "$GIT_DIR/hooks/pre-commit" &&
12
+ exec "$GIT_DIR/hooks/pre-commit"
13
+ :
@@ -14,7 +14,7 @@
14
14
  # Information about the commits which are being pushed is supplied as lines to
15
15
  # the standard input in the form:
16
16
  #
17
- # <local ref> <local sha1> <remote ref> <remote sha1>
17
+ # <local ref> <local oid> <remote ref> <remote oid>
18
18
  #
19
19
  # This sample shows how to prevent push of commits where the log message starts
20
20
  # with "WIP" (work in progress).
@@ -22,27 +22,27 @@
22
22
  remote="$1"
23
23
  url="$2"
24
24
 
25
- z40=0000000000000000000000000000000000000000
25
+ zero=$(git hash-object --stdin </dev/null | tr '[0-9a-f]' '0')
26
26
 
27
- while read local_ref local_sha remote_ref remote_sha
27
+ while read local_ref local_oid remote_ref remote_oid
28
28
  do
29
- if [ "$local_sha" = $z40 ]
29
+ if test "$local_oid" = "$zero"
30
30
  then
31
31
  # Handle delete
32
32
  :
33
33
  else
34
- if [ "$remote_sha" = $z40 ]
34
+ if test "$remote_oid" = "$zero"
35
35
  then
36
36
  # New branch, examine all commits
37
- range="$local_sha"
37
+ range="$local_oid"
38
38
  else
39
39
  # Update to existing branch, examine new commits
40
- range="$remote_sha..$local_sha"
40
+ range="$remote_oid..$local_oid"
41
41
  fi
42
42
 
43
43
  # Check for WIP commit
44
- commit=`git rev-list -n 1 --grep '^WIP' "$range"`
45
- if [ -n "$commit" ]
44
+ commit=$(git rev-list -n 1 --grep '^WIP' "$range")
45
+ if test -n "$commit"
46
46
  then
47
47
  echo >&2 "Found WIP commit in $local_ref, not pushing"
48
48
  exit 1
@@ -0,0 +1,78 @@
1
+ #!/bin/sh
2
+
3
+ # An example hook script to update a checked-out tree on a git push.
4
+ #
5
+ # This hook is invoked by git-receive-pack(1) when it reacts to git
6
+ # push and updates reference(s) in its repository, and when the push
7
+ # tries to update the branch that is currently checked out and the
8
+ # receive.denyCurrentBranch configuration variable is set to
9
+ # updateInstead.
10
+ #
11
+ # By default, such a push is refused if the working tree and the index
12
+ # of the remote repository has any difference from the currently
13
+ # checked out commit; when both the working tree and the index match
14
+ # the current commit, they are updated to match the newly pushed tip
15
+ # of the branch. This hook is to be used to override the default
16
+ # behaviour; however the code below reimplements the default behaviour
17
+ # as a starting point for convenient modification.
18
+ #
19
+ # The hook receives the commit with which the tip of the current
20
+ # branch is going to be updated:
21
+ commit=$1
22
+
23
+ # It can exit with a non-zero status to refuse the push (when it does
24
+ # so, it must not modify the index or the working tree).
25
+ die () {
26
+ echo >&2 "$*"
27
+ exit 1
28
+ }
29
+
30
+ # Or it can make any necessary changes to the working tree and to the
31
+ # index to bring them to the desired state when the tip of the current
32
+ # branch is updated to the new commit, and exit with a zero status.
33
+ #
34
+ # For example, the hook can simply run git read-tree -u -m HEAD "$1"
35
+ # in order to emulate git fetch that is run in the reverse direction
36
+ # with git push, as the two-tree form of git read-tree -u -m is
37
+ # essentially the same as git switch or git checkout that switches
38
+ # branches while keeping the local changes in the working tree that do
39
+ # not interfere with the difference between the branches.
40
+
41
+ # The below is a more-or-less exact translation to shell of the C code
42
+ # for the default behaviour for git's push-to-checkout hook defined in
43
+ # the push_to_deploy() function in builtin/receive-pack.c.
44
+ #
45
+ # Note that the hook will be executed from the repository directory,
46
+ # not from the working tree, so if you want to perform operations on
47
+ # the working tree, you will have to adapt your code accordingly, e.g.
48
+ # by adding "cd .." or using relative paths.
49
+
50
+ if ! git update-index -q --ignore-submodules --refresh
51
+ then
52
+ die "Up-to-date check failed"
53
+ fi
54
+
55
+ if ! git diff-files --quiet --ignore-submodules --
56
+ then
57
+ die "Working directory has unstaged changes"
58
+ fi
59
+
60
+ # This is a rough translation of:
61
+ #
62
+ # head_has_history() ? "HEAD" : EMPTY_TREE_SHA1_HEX
63
+ if git cat-file -e HEAD 2>/dev/null
64
+ then
65
+ head=HEAD
66
+ else
67
+ head=$(git hash-object -t tree --stdin </dev/null)
68
+ fi
69
+
70
+ if ! git diff-index --quiet --cached --ignore-submodules $head --
71
+ then
72
+ die "Working directory has staged changes"
73
+ fi
74
+
75
+ if ! git read-tree -u -m "$commit"
76
+ then
77
+ die "Could not update working tree to new HEAD"
78
+ fi
@@ -43,11 +43,11 @@ if [ -z "$refname" -o -z "$oldrev" -o -z "$newrev" ]; then
43
43
  fi
44
44
 
45
45
  # --- Config
46
- allowunannotated=$(git config --bool hooks.allowunannotated)
47
- allowdeletebranch=$(git config --bool hooks.allowdeletebranch)
48
- denycreatebranch=$(git config --bool hooks.denycreatebranch)
49
- allowdeletetag=$(git config --bool hooks.allowdeletetag)
50
- allowmodifytag=$(git config --bool hooks.allowmodifytag)
46
+ allowunannotated=$(git config --type=bool hooks.allowunannotated)
47
+ allowdeletebranch=$(git config --type=bool hooks.allowdeletebranch)
48
+ denycreatebranch=$(git config --type=bool hooks.denycreatebranch)
49
+ allowdeletetag=$(git config --type=bool hooks.allowdeletetag)
50
+ allowmodifytag=$(git config --type=bool hooks.allowmodifytag)
51
51
 
52
52
  # check for no description
53
53
  projectdesc=$(sed -e '1q' "$GIT_DIR/description")
@@ -60,7 +60,7 @@ esac
60
60
 
61
61
  # --- Check types
62
62
  # if $newrev is 0000...0000, it's a commit to delete a ref.
63
- zero="0000000000000000000000000000000000000000"
63
+ zero=$(git hash-object --stdin </dev/null | tr '[0-9a-f]' '0')
64
64
  if [ "$newrev" = "$zero" ]; then
65
65
  newrev_type=delete
66
66
  else
data/.git/index CHANGED
Binary file
data/.git/logs/HEAD CHANGED
@@ -1,3 +1,3 @@
1
- 0000000000000000000000000000000000000000 67d9309e77842e64a4b43d8c3fa2c52ece706a3d sdmrelease <support@strongdm.com> 1671651098 +0000 clone: from git@github.com:strongdm/strongdm-sdk-ruby.git
2
- 67d9309e77842e64a4b43d8c3fa2c52ece706a3d 67d9309e77842e64a4b43d8c3fa2c52ece706a3d sdmrelease <support@strongdm.com> 1671651098 +0000 checkout: moving from master to master
3
- 67d9309e77842e64a4b43d8c3fa2c52ece706a3d ed61eaceb77e62a0c1a0bb8d36fc0bda7b242af4 sdmrelease <support@strongdm.com> 1671651098 +0000 merge origin/development: Fast-forward
1
+ 0000000000000000000000000000000000000000 7f688fbda6c715ebd7f057720b4e16216ff54064 root <root@a1a787bc334e.(none)> 1676573766 +0000 clone: from github.com:strongdm/strongdm-sdk-ruby.git
2
+ 7f688fbda6c715ebd7f057720b4e16216ff54064 7f688fbda6c715ebd7f057720b4e16216ff54064 root <root@a1a787bc334e.(none)> 1676573766 +0000 checkout: moving from master to master
3
+ 7f688fbda6c715ebd7f057720b4e16216ff54064 ffd4706f2b64466550868d42ee2a5a4b88b3a372 root <root@a1a787bc334e.(none)> 1676573766 +0000 merge origin/development: Fast-forward
@@ -1,2 +1,2 @@
1
- 0000000000000000000000000000000000000000 67d9309e77842e64a4b43d8c3fa2c52ece706a3d sdmrelease <support@strongdm.com> 1671651098 +0000 clone: from git@github.com:strongdm/strongdm-sdk-ruby.git
2
- 67d9309e77842e64a4b43d8c3fa2c52ece706a3d ed61eaceb77e62a0c1a0bb8d36fc0bda7b242af4 sdmrelease <support@strongdm.com> 1671651098 +0000 merge origin/development: Fast-forward
1
+ 0000000000000000000000000000000000000000 7f688fbda6c715ebd7f057720b4e16216ff54064 root <root@a1a787bc334e.(none)> 1676573766 +0000 clone: from github.com:strongdm/strongdm-sdk-ruby.git
2
+ 7f688fbda6c715ebd7f057720b4e16216ff54064 ffd4706f2b64466550868d42ee2a5a4b88b3a372 root <root@a1a787bc334e.(none)> 1676573766 +0000 merge origin/development: Fast-forward
@@ -1 +1 @@
1
- 0000000000000000000000000000000000000000 67d9309e77842e64a4b43d8c3fa2c52ece706a3d sdmrelease <support@strongdm.com> 1671651098 +0000 clone: from git@github.com:strongdm/strongdm-sdk-ruby.git
1
+ 0000000000000000000000000000000000000000 7f688fbda6c715ebd7f057720b4e16216ff54064 root <root@a1a787bc334e.(none)> 1676573766 +0000 clone: from github.com:strongdm/strongdm-sdk-ruby.git
data/.git/packed-refs CHANGED
@@ -1,6 +1,6 @@
1
1
  # pack-refs with: peeled fully-peeled sorted
2
- ed61eaceb77e62a0c1a0bb8d36fc0bda7b242af4 refs/remotes/origin/development
3
- 67d9309e77842e64a4b43d8c3fa2c52ece706a3d refs/remotes/origin/master
2
+ ffd4706f2b64466550868d42ee2a5a4b88b3a372 refs/remotes/origin/development
3
+ 7f688fbda6c715ebd7f057720b4e16216ff54064 refs/remotes/origin/master
4
4
  2e4fe8087177ddea9b3991ca499f758384839c89 refs/tags/untagged-84fd83a4484c785cce63
5
5
  04f604866214fab4d5663b5171a3e596331577bd refs/tags/v0.9.4
6
6
  6f9a7b75b345c65fb554884907b7060680c807b7 refs/tags/v0.9.5
@@ -53,3 +53,5 @@ bfb8a3cdb41c617913f0295b25ac7ecc7398d2c2 refs/tags/v3.5.0
53
53
  8ddacf3c9cbe388ee11ed4617ba41cf7b0cc2a41 refs/tags/v3.5.1
54
54
  003b46a249146cb3a4f25d16432c89f0b78ac37c refs/tags/v3.5.3
55
55
  67d9309e77842e64a4b43d8c3fa2c52ece706a3d refs/tags/v3.5.4
56
+ ed61eaceb77e62a0c1a0bb8d36fc0bda7b242af4 refs/tags/v3.5.5
57
+ 7f688fbda6c715ebd7f057720b4e16216ff54064 refs/tags/v3.6.0
@@ -1 +1 @@
1
- ed61eaceb77e62a0c1a0bb8d36fc0bda7b242af4
1
+ ffd4706f2b64466550868d42ee2a5a4b88b3a372
data/.gitignore ADDED
@@ -0,0 +1 @@
1
+ *.gem
data/lib/constants.rb CHANGED
@@ -44,6 +44,7 @@ module SDM
44
44
 
45
45
  # Providers responsible for managing roles and users.
46
46
  # None, or an empty string, implies the user is managed by strongDM.
47
+ # Deprecated: Please use SCIMProvider instead.
47
48
  module Provider
48
49
  NONE = ""
49
50
  OKTA = "okta"
@@ -53,4 +54,16 @@ module SDM
53
54
  ONE_LOGIN = "onelogin"
54
55
  GOOGLE = "google"
55
56
  end
57
+
58
+ # Providers responsible for managing roles and users.
59
+ # None, or an empty string, implies the user is managed by strongDM.
60
+ module SCIMProvider
61
+ NONE = ""
62
+ OKTA = "okta"
63
+ SAIL_POINT = "sailpoint"
64
+ AZURE = "azure"
65
+ GENERIC = "generic"
66
+ ONE_LOGIN = "onelogin"
67
+ GOOGLE = "google"
68
+ end
56
69
  end
@@ -32,6 +32,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
32
32
  optional :aws_console, :message, 3000, "v1.AWSConsole"
33
33
  optional :aws_console_static_key_pair, :message, 3001, "v1.AWSConsoleStaticKeyPair"
34
34
  optional :amazon_eks, :message, 802, "v1.AmazonEKS"
35
+ optional :amazon_eks_instance_profile, :message, 809, "v1.AmazonEKSInstanceProfile"
35
36
  optional :amazon_eks_user_impersonation, :message, 818, "v1.AmazonEKSUserImpersonation"
36
37
  optional :amazon_es, :message, 600, "v1.AmazonES"
37
38
  optional :amazon_mqamqp_091, :message, 2501, "v1.AmazonMQAMQP091"
@@ -250,6 +251,24 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
250
251
  optional :role_external_id, :string, 10
251
252
  optional :secret_access_key, :string, 3
252
253
  end
254
+ add_message "v1.AmazonEKSInstanceProfile" do
255
+ optional :id, :string, 32768
256
+ optional :name, :string, 32769
257
+ optional :healthy, :bool, 32770
258
+ optional :tags, :message, 32771, "v1.Tags"
259
+ optional :secret_store_id, :string, 32772
260
+ optional :egress_filter, :string, 32773
261
+ optional :bind_interface, :string, 32774
262
+ optional :certificate_authority, :string, 2
263
+ optional :cluster_name, :string, 5
264
+ optional :endpoint, :string, 1
265
+ optional :healthcheck_namespace, :string, 8
266
+ optional :region, :string, 4
267
+ optional :remote_identity_group_id, :string, 9
268
+ optional :remote_identity_healthcheck_username, :string, 10
269
+ optional :role_arn, :string, 6
270
+ optional :role_external_id, :string, 7
271
+ end
253
272
  add_message "v1.AmazonEKSUserImpersonation" do
254
273
  optional :id, :string, 32768
255
274
  optional :name, :string, 32769
@@ -1277,6 +1296,7 @@ module V1
1277
1296
  AWSConsole = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("v1.AWSConsole").msgclass
1278
1297
  AWSConsoleStaticKeyPair = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("v1.AWSConsoleStaticKeyPair").msgclass
1279
1298
  AmazonEKS = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("v1.AmazonEKS").msgclass
1299
+ AmazonEKSInstanceProfile = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("v1.AmazonEKSInstanceProfile").msgclass
1280
1300
  AmazonEKSUserImpersonation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("v1.AmazonEKSUserImpersonation").msgclass
1281
1301
  AmazonES = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("v1.AmazonES").msgclass
1282
1302
  AmazonMQAMQP091 = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("v1.AmazonMQAMQP091").msgclass
@@ -26,6 +26,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
26
26
  optional :main_noun, :string, 1941400
27
27
  optional :id_prefix, :string, 1941402
28
28
  repeated :targets, :string, 1941401
29
+ optional :disable_snapshot_vertical, :bool, 1941403
29
30
  end
30
31
  add_message "v1.MethodOptions" do
31
32
  optional :method, :string, 1941300
data/lib/grpc/plumbing.rb CHANGED
@@ -70,6 +70,20 @@ module SDM
70
70
  return Google::Protobuf::Timestamp.new(seconds: t.to_i, nanos: t.nsec)
71
71
  end
72
72
 
73
+ def self.convert_duration_to_porcelain(d)
74
+ if d == nil
75
+ return nil
76
+ end
77
+ return d.to_f
78
+ end
79
+
80
+ def self.convert_duration_to_plumbing(d)
81
+ if d == nil
82
+ return nil
83
+ end
84
+ return Google::Protobuf::Duration.new(seconds: d.to_i, nanos: (d.modulo(1) * 10 ** 9).to_i)
85
+ end
86
+
73
87
  def self.convert_tags_to_porcelain(t)
74
88
  if t == nil
75
89
  return nil
@@ -1202,6 +1216,70 @@ module SDM
1202
1216
  end
1203
1217
  items
1204
1218
  end
1219
+ def self.convert_amazon_eks_instance_profile_to_porcelain(plumbing)
1220
+ if plumbing == nil
1221
+ return nil
1222
+ end
1223
+ porcelain = AmazonEKSInstanceProfile.new()
1224
+ porcelain.bind_interface = (plumbing.bind_interface)
1225
+ porcelain.certificate_authority = (plumbing.certificate_authority)
1226
+ porcelain.cluster_name = (plumbing.cluster_name)
1227
+ porcelain.egress_filter = (plumbing.egress_filter)
1228
+ porcelain.endpoint = (plumbing.endpoint)
1229
+ porcelain.healthcheck_namespace = (plumbing.healthcheck_namespace)
1230
+ porcelain.healthy = (plumbing.healthy)
1231
+ porcelain.id = (plumbing.id)
1232
+ porcelain.name = (plumbing.name)
1233
+ porcelain.region = (plumbing.region)
1234
+ porcelain.remote_identity_group_id = (plumbing.remote_identity_group_id)
1235
+ porcelain.remote_identity_healthcheck_username = (plumbing.remote_identity_healthcheck_username)
1236
+ porcelain.role_arn = (plumbing.role_arn)
1237
+ porcelain.role_external_id = (plumbing.role_external_id)
1238
+ porcelain.secret_store_id = (plumbing.secret_store_id)
1239
+ porcelain.tags = convert_tags_to_porcelain(plumbing.tags)
1240
+ porcelain
1241
+ end
1242
+
1243
+ def self.convert_amazon_eks_instance_profile_to_plumbing(porcelain)
1244
+ if porcelain == nil
1245
+ return nil
1246
+ end
1247
+ plumbing = V1::AmazonEKSInstanceProfile.new()
1248
+ plumbing.bind_interface = (porcelain.bind_interface)
1249
+ plumbing.certificate_authority = (porcelain.certificate_authority)
1250
+ plumbing.cluster_name = (porcelain.cluster_name)
1251
+ plumbing.egress_filter = (porcelain.egress_filter)
1252
+ plumbing.endpoint = (porcelain.endpoint)
1253
+ plumbing.healthcheck_namespace = (porcelain.healthcheck_namespace)
1254
+ plumbing.healthy = (porcelain.healthy)
1255
+ plumbing.id = (porcelain.id)
1256
+ plumbing.name = (porcelain.name)
1257
+ plumbing.region = (porcelain.region)
1258
+ plumbing.remote_identity_group_id = (porcelain.remote_identity_group_id)
1259
+ plumbing.remote_identity_healthcheck_username = (porcelain.remote_identity_healthcheck_username)
1260
+ plumbing.role_arn = (porcelain.role_arn)
1261
+ plumbing.role_external_id = (porcelain.role_external_id)
1262
+ plumbing.secret_store_id = (porcelain.secret_store_id)
1263
+ plumbing.tags = convert_tags_to_plumbing(porcelain.tags)
1264
+ plumbing
1265
+ end
1266
+ def self.convert_repeated_amazon_eks_instance_profile_to_plumbing(porcelains)
1267
+ items = Array.new
1268
+ porcelains.each do |porcelain|
1269
+ plumbing = convert_amazon_eks_instance_profile_to_plumbing(porcelain)
1270
+ items.append(plumbing)
1271
+ end
1272
+ items
1273
+ end
1274
+
1275
+ def self.convert_repeated_amazon_eks_instance_profile_to_porcelain(plumbings)
1276
+ items = Array.new
1277
+ plumbings.each do |plumbing|
1278
+ porcelain = convert_amazon_eks_instance_profile_to_porcelain(plumbing)
1279
+ items.append(porcelain)
1280
+ end
1281
+ items
1282
+ end
1205
1283
  def self.convert_amazon_eks_user_impersonation_to_porcelain(plumbing)
1206
1284
  if plumbing == nil
1207
1285
  return nil
@@ -5526,6 +5604,9 @@ module SDM
5526
5604
  if porcelain.instance_of? AmazonEKS
5527
5605
  plumbing.amazon_eks = convert_amazon_eks_to_plumbing(porcelain)
5528
5606
  end
5607
+ if porcelain.instance_of? AmazonEKSInstanceProfile
5608
+ plumbing.amazon_eks_instance_profile = convert_amazon_eks_instance_profile_to_plumbing(porcelain)
5609
+ end
5529
5610
  if porcelain.instance_of? AmazonEKSUserImpersonation
5530
5611
  plumbing.amazon_eks_user_impersonation = convert_amazon_eks_user_impersonation_to_plumbing(porcelain)
5531
5612
  end
@@ -5758,6 +5839,9 @@ module SDM
5758
5839
  if plumbing.amazon_eks != nil
5759
5840
  return convert_amazon_eks_to_porcelain(plumbing.amazon_eks)
5760
5841
  end
5842
+ if plumbing.amazon_eks_instance_profile != nil
5843
+ return convert_amazon_eks_instance_profile_to_porcelain(plumbing.amazon_eks_instance_profile)
5844
+ end
5761
5845
  if plumbing.amazon_eks_user_impersonation != nil
5762
5846
  return convert_amazon_eks_user_impersonation_to_porcelain(plumbing.amazon_eks_user_impersonation)
5763
5847
  end
@@ -1047,6 +1047,85 @@ module SDM
1047
1047
  end
1048
1048
  end
1049
1049
 
1050
+ class AmazonEKSInstanceProfile
1051
+ # Bind interface
1052
+ attr_accessor :bind_interface
1053
+
1054
+ attr_accessor :certificate_authority
1055
+
1056
+ attr_accessor :cluster_name
1057
+ # A filter applied to the routing logic to pin datasource to nodes.
1058
+ attr_accessor :egress_filter
1059
+
1060
+ attr_accessor :endpoint
1061
+ # The path used to check the health of your connection. Defaults to `default`.
1062
+ attr_accessor :healthcheck_namespace
1063
+ # True if the datasource is reachable and the credentials are valid.
1064
+ attr_accessor :healthy
1065
+ # Unique identifier of the Resource.
1066
+ attr_accessor :id
1067
+ # Unique human-readable name of the Resource.
1068
+ attr_accessor :name
1069
+
1070
+ attr_accessor :region
1071
+
1072
+ attr_accessor :remote_identity_group_id
1073
+
1074
+ attr_accessor :remote_identity_healthcheck_username
1075
+
1076
+ attr_accessor :role_arn
1077
+
1078
+ attr_accessor :role_external_id
1079
+ # ID of the secret store containing credentials for this resource, if any.
1080
+ attr_accessor :secret_store_id
1081
+ # Tags is a map of key, value pairs.
1082
+ attr_accessor :tags
1083
+
1084
+ def initialize(
1085
+ bind_interface: nil,
1086
+ certificate_authority: nil,
1087
+ cluster_name: nil,
1088
+ egress_filter: nil,
1089
+ endpoint: nil,
1090
+ healthcheck_namespace: nil,
1091
+ healthy: nil,
1092
+ id: nil,
1093
+ name: nil,
1094
+ region: nil,
1095
+ remote_identity_group_id: nil,
1096
+ remote_identity_healthcheck_username: nil,
1097
+ role_arn: nil,
1098
+ role_external_id: nil,
1099
+ secret_store_id: nil,
1100
+ tags: nil
1101
+ )
1102
+ @bind_interface = bind_interface == nil ? "" : bind_interface
1103
+ @certificate_authority = certificate_authority == nil ? "" : certificate_authority
1104
+ @cluster_name = cluster_name == nil ? "" : cluster_name
1105
+ @egress_filter = egress_filter == nil ? "" : egress_filter
1106
+ @endpoint = endpoint == nil ? "" : endpoint
1107
+ @healthcheck_namespace = healthcheck_namespace == nil ? "" : healthcheck_namespace
1108
+ @healthy = healthy == nil ? false : healthy
1109
+ @id = id == nil ? "" : id
1110
+ @name = name == nil ? "" : name
1111
+ @region = region == nil ? "" : region
1112
+ @remote_identity_group_id = remote_identity_group_id == nil ? "" : remote_identity_group_id
1113
+ @remote_identity_healthcheck_username = remote_identity_healthcheck_username == nil ? "" : remote_identity_healthcheck_username
1114
+ @role_arn = role_arn == nil ? "" : role_arn
1115
+ @role_external_id = role_external_id == nil ? "" : role_external_id
1116
+ @secret_store_id = secret_store_id == nil ? "" : secret_store_id
1117
+ @tags = tags == nil ? SDM::_porcelain_zero_value_tags() : tags
1118
+ end
1119
+
1120
+ def to_json(options = {})
1121
+ hash = {}
1122
+ self.instance_variables.each do |var|
1123
+ hash[var.id2name.delete_prefix("@")] = self.instance_variable_get var
1124
+ end
1125
+ hash.to_json
1126
+ end
1127
+ end
1128
+
1050
1129
  class AmazonEKSUserImpersonation
1051
1130
  attr_accessor :access_key
1052
1131
  # Bind interface
@@ -2398,7 +2477,6 @@ module SDM
2398
2477
  end
2399
2478
  end
2400
2479
 
2401
- # DelineaStore is currently unstable, and its API may change, or it may be removed, without a major version bump.
2402
2480
  class DelineaStore
2403
2481
  # Unique identifier of the SecretStore.
2404
2482
  attr_accessor :id
data/lib/strongdm.rb CHANGED
@@ -29,7 +29,7 @@ module SDM #:nodoc:
29
29
  DEFAULT_BASE_RETRY_DELAY = 0.0030 # 30 ms
30
30
  DEFAULT_MAX_RETRY_DELAY = 300 # 300 seconds
31
31
  API_VERSION = "2021-08-23"
32
- USER_AGENT = "strongdm-sdk-ruby/3.5.5"
32
+ USER_AGENT = "strongdm-sdk-ruby/3.6.1"
33
33
  private_constant :DEFAULT_MAX_RETRIES, :DEFAULT_BASE_RETRY_DELAY, :DEFAULT_MAX_RETRY_DELAY, :API_VERSION, :USER_AGENT
34
34
 
35
35
  # Creates a new strongDM API client.
data/lib/svc.rb CHANGED
@@ -1000,6 +1000,7 @@ module SDM #:nodoc:
1000
1000
  # {AKSServiceAccountUserImpersonation}
1001
1001
  # {AKSUserImpersonation}
1002
1002
  # {AmazonEKS}
1003
+ # {AmazonEKSInstanceProfile}
1003
1004
  # {AmazonEKSUserImpersonation}
1004
1005
  # {AmazonES}
1005
1006
  # {AmazonMQAMQP091}
data/lib/version CHANGED
@@ -13,5 +13,5 @@
13
13
  # limitations under the License.
14
14
  #
15
15
  module SDM
16
- VERSION = "3.5.5"
16
+ VERSION = "3.6.1"
17
17
  end
data/lib/version.rb CHANGED
@@ -13,5 +13,5 @@
13
13
  # limitations under the License.
14
14
  #
15
15
  module SDM
16
- VERSION = "3.5.5"
16
+ VERSION = "3.6.1"
17
17
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: strongdm
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.5.5
4
+ version: 3.6.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - strongDM Team
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-12-21 00:00:00.000000000 Z
11
+ date: 2023-02-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: grpc
@@ -69,21 +69,24 @@ files:
69
69
  - "./.git/hooks/post-update.sample"
70
70
  - "./.git/hooks/pre-applypatch.sample"
71
71
  - "./.git/hooks/pre-commit.sample"
72
+ - "./.git/hooks/pre-merge-commit.sample"
72
73
  - "./.git/hooks/pre-push.sample"
73
74
  - "./.git/hooks/pre-rebase.sample"
74
75
  - "./.git/hooks/pre-receive.sample"
75
76
  - "./.git/hooks/prepare-commit-msg.sample"
77
+ - "./.git/hooks/push-to-checkout.sample"
76
78
  - "./.git/hooks/update.sample"
77
79
  - "./.git/index"
78
80
  - "./.git/info/exclude"
79
81
  - "./.git/logs/HEAD"
80
82
  - "./.git/logs/refs/heads/master"
81
83
  - "./.git/logs/refs/remotes/origin/HEAD"
82
- - "./.git/objects/pack/pack-ebefa28012a8f08cd83ed884ef22b6c72831eb2a.idx"
83
- - "./.git/objects/pack/pack-ebefa28012a8f08cd83ed884ef22b6c72831eb2a.pack"
84
+ - "./.git/objects/pack/pack-c0eff6575c38c9865988c2b59ce4060fff518355.idx"
85
+ - "./.git/objects/pack/pack-c0eff6575c38c9865988c2b59ce4060fff518355.pack"
84
86
  - "./.git/packed-refs"
85
87
  - "./.git/refs/heads/master"
86
88
  - "./.git/refs/remotes/origin/HEAD"
89
+ - "./.gitignore"
87
90
  - "./.yardopts"
88
91
  - "./LICENSE"
89
92
  - "./README.md"
@@ -140,7 +143,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
140
143
  - !ruby/object:Gem::Version
141
144
  version: 1.3.6
142
145
  requirements: []
143
- rubygems_version: 3.0.8
146
+ rubygems_version: 3.2.5
144
147
  signing_key:
145
148
  specification_version: 4
146
149
  summary: strongDM SDK for the Ruby programming language.