conjur-api 5.3.8.pre.8 → 5.3.8.pre.194

Sign up to get free protection for your applications and to get access to all the features.
Files changed (143) hide show
  1. checksums.yaml +4 -4
  2. data/.codeclimate.yml +10 -0
  3. data/.dockerignore +1 -0
  4. data/.github/CODEOWNERS +10 -0
  5. data/.gitignore +32 -0
  6. data/.gitleaks.toml +219 -0
  7. data/.overcommit.yml +16 -0
  8. data/.project +18 -0
  9. data/.rubocop.yml +3 -0
  10. data/.rubocop_settings.yml +86 -0
  11. data/.rubocop_todo.yml +709 -0
  12. data/.yardopts +1 -0
  13. data/CHANGELOG.md +435 -0
  14. data/CONTRIBUTING.md +141 -0
  15. data/Dockerfile +16 -0
  16. data/Gemfile +7 -0
  17. data/Jenkinsfile +168 -0
  18. data/LICENSE +202 -0
  19. data/README.md +162 -0
  20. data/Rakefile +47 -0
  21. data/SECURITY.md +42 -0
  22. data/VERSION +1 -1
  23. data/bin/parse-changelog.sh +12 -0
  24. data/ci/configure_v4.sh +12 -0
  25. data/ci/configure_v5.sh +14 -0
  26. data/ci/submit-coverage +36 -0
  27. data/conjur-api.gemspec +40 -0
  28. data/dev/Dockerfile.dev +12 -0
  29. data/dev/docker-compose.yml +56 -0
  30. data/dev/start +22 -0
  31. data/dev/stop +5 -0
  32. data/docker-compose.yml +76 -0
  33. data/example/demo_v4.rb +49 -0
  34. data/example/demo_v5.rb +57 -0
  35. data/features/authenticators.feature +33 -0
  36. data/features/authn_local.feature +32 -0
  37. data/features/exists.feature +37 -0
  38. data/features/group.feature +11 -0
  39. data/features/host.feature +50 -0
  40. data/features/host_factory_create_host.feature +28 -0
  41. data/features/host_factory_token.feature +63 -0
  42. data/features/load_policy.feature +61 -0
  43. data/features/members.feature +51 -0
  44. data/features/new_api.feature +36 -0
  45. data/features/permitted.feature +70 -0
  46. data/features/permitted_roles.feature +30 -0
  47. data/features/public_keys.feature +11 -0
  48. data/features/resource_fields.feature +53 -0
  49. data/features/role_fields.feature +15 -0
  50. data/features/rotate_api_key.feature +13 -0
  51. data/features/step_definitions/api_steps.rb +18 -0
  52. data/features/step_definitions/policy_steps.rb +75 -0
  53. data/features/step_definitions/result_steps.rb +7 -0
  54. data/features/support/env.rb +18 -0
  55. data/features/support/hooks.rb +3 -0
  56. data/features/support/world.rb +12 -0
  57. data/features/update_password.feature +14 -0
  58. data/features/user.feature +58 -0
  59. data/features/variable_fields.feature +20 -0
  60. data/features/variable_value.feature +60 -0
  61. data/features_v4/authn_local.feature +27 -0
  62. data/features_v4/exists.feature +29 -0
  63. data/features_v4/host.feature +18 -0
  64. data/features_v4/host_factory_token.feature +49 -0
  65. data/features_v4/members.feature +39 -0
  66. data/features_v4/permitted.feature +15 -0
  67. data/features_v4/permitted_roles.feature +8 -0
  68. data/features_v4/resource_fields.feature +47 -0
  69. data/features_v4/rotate_api_key.feature +13 -0
  70. data/features_v4/step_definitions/api_steps.rb +17 -0
  71. data/features_v4/step_definitions/result_steps.rb +3 -0
  72. data/features_v4/support/env.rb +23 -0
  73. data/features_v4/support/policy.yml +34 -0
  74. data/features_v4/support/world.rb +12 -0
  75. data/features_v4/variable_fields.feature +11 -0
  76. data/features_v4/variable_value.feature +54 -0
  77. data/lib/conjur/acts_as_resource.rb +123 -0
  78. data/lib/conjur/acts_as_role.rb +142 -0
  79. data/lib/conjur/acts_as_rolsource.rb +32 -0
  80. data/lib/conjur/acts_as_user.rb +68 -0
  81. data/lib/conjur/api/authenticators.rb +35 -0
  82. data/lib/conjur/api/authn.rb +125 -0
  83. data/lib/conjur/api/host_factories.rb +71 -0
  84. data/lib/conjur/api/ldap_sync.rb +38 -0
  85. data/lib/conjur/api/policies.rb +56 -0
  86. data/lib/conjur/api/pubkeys.rb +53 -0
  87. data/lib/conjur/api/resources.rb +109 -0
  88. data/lib/conjur/api/roles.rb +98 -0
  89. data/lib/conjur/api/router/v4.rb +206 -0
  90. data/lib/conjur/api/router/v5.rb +248 -0
  91. data/lib/conjur/api/variables.rb +59 -0
  92. data/lib/conjur/api.rb +105 -0
  93. data/lib/conjur/base.rb +355 -0
  94. data/lib/conjur/base_object.rb +57 -0
  95. data/lib/conjur/build_object.rb +47 -0
  96. data/lib/conjur/cache.rb +26 -0
  97. data/lib/conjur/cert_utils.rb +63 -0
  98. data/lib/conjur/cidr.rb +71 -0
  99. data/lib/conjur/configuration.rb +460 -0
  100. data/lib/conjur/escape.rb +129 -0
  101. data/lib/conjur/exceptions.rb +4 -0
  102. data/lib/conjur/group.rb +41 -0
  103. data/lib/conjur/has_attributes.rb +98 -0
  104. data/lib/conjur/host.rb +27 -0
  105. data/lib/conjur/host_factory.rb +75 -0
  106. data/lib/conjur/host_factory_token.rb +78 -0
  107. data/lib/conjur/id.rb +71 -0
  108. data/lib/conjur/layer.rb +9 -0
  109. data/lib/conjur/log.rb +72 -0
  110. data/lib/conjur/log_source.rb +60 -0
  111. data/lib/conjur/policy.rb +34 -0
  112. data/lib/conjur/policy_load_result.rb +61 -0
  113. data/lib/conjur/query_string.rb +12 -0
  114. data/lib/conjur/resource.rb +29 -0
  115. data/lib/conjur/role.rb +29 -0
  116. data/lib/conjur/role_grant.rb +85 -0
  117. data/lib/conjur/routing.rb +29 -0
  118. data/lib/conjur/user.rb +40 -0
  119. data/lib/conjur/variable.rb +208 -0
  120. data/lib/conjur/webservice.rb +30 -0
  121. data/lib/conjur-api/version.rb +24 -0
  122. data/lib/conjur-api.rb +2 -0
  123. data/publish.sh +5 -0
  124. data/spec/api/host_factories_spec.rb +34 -0
  125. data/spec/api_spec.rb +254 -0
  126. data/spec/base_object_spec.rb +13 -0
  127. data/spec/cert_utils_spec.rb +173 -0
  128. data/spec/cidr_spec.rb +34 -0
  129. data/spec/configuration_spec.rb +330 -0
  130. data/spec/has_attributes_spec.rb +63 -0
  131. data/spec/helpers/errors_matcher.rb +34 -0
  132. data/spec/helpers/request_helpers.rb +10 -0
  133. data/spec/id_spec.rb +29 -0
  134. data/spec/ldap_sync_spec.rb +21 -0
  135. data/spec/log_source_spec.rb +13 -0
  136. data/spec/log_spec.rb +42 -0
  137. data/spec/roles_spec.rb +24 -0
  138. data/spec/spec_helper.rb +113 -0
  139. data/spec/ssl_spec.rb +109 -0
  140. data/spec/uri_escape_spec.rb +21 -0
  141. data/test.sh +73 -0
  142. data/tmp/.keep +0 -0
  143. metadata +191 -21
data/.rubocop_todo.yml ADDED
@@ -0,0 +1,709 @@
1
+ # This configuration was generated by
2
+ # `rubocop --auto-gen-config`
3
+ # on 2018-08-28 12:08:58 +0200 using RuboCop version 0.58.2.
4
+ # The point is for the user to remove these configuration records
5
+ # one by one as the offenses are removed from the code base.
6
+ # Note that changes in the inspected code, or installation of new
7
+ # versions of RuboCop, may require this file to be generated again.
8
+
9
+ # Offense count: 6
10
+ # Cop supports --auto-correct.
11
+ # Configuration parameters: Include, TreatCommentsAsGroupSeparators.
12
+ # Include: **/*.gemspec
13
+ Gemspec/OrderedDependencies:
14
+ Exclude:
15
+ - 'conjur-api.gemspec'
16
+
17
+ # Offense count: 1
18
+ # Configuration parameters: Include.
19
+ # Include: **/*.gemspec
20
+ Gemspec/RequiredRubyVersion:
21
+ Exclude:
22
+ - 'conjur-api.gemspec'
23
+
24
+ # Offense count: 2
25
+ # Cop supports --auto-correct.
26
+ # Configuration parameters: EnforcedStyleAlignWith.
27
+ # SupportedStylesAlignWith: either, start_of_block, start_of_line
28
+ Layout/BlockAlignment:
29
+ Exclude:
30
+ - 'lib/conjur/variable.rb'
31
+
32
+ # Offense count: 2
33
+ # Cop supports --auto-correct.
34
+ Layout/BlockEndNewline:
35
+ Exclude:
36
+ - 'spec/api_spec.rb'
37
+
38
+ # Offense count: 1
39
+ # Cop supports --auto-correct.
40
+ Layout/ClosingHeredocIndentation:
41
+ Exclude:
42
+ - 'spec/configuration_spec.rb'
43
+
44
+ # Offense count: 1
45
+ # Cop supports --auto-correct.
46
+ Layout/CommentIndentation:
47
+ Exclude:
48
+ - 'lib/conjur/api/host_factories.rb'
49
+
50
+ # Offense count: 1
51
+ # Cop supports --auto-correct.
52
+ Layout/EmptyLineAfterMagicComment:
53
+ Exclude:
54
+ - 'conjur-api.gemspec'
55
+
56
+ # Offense count: 9
57
+ # Cop supports --auto-correct.
58
+ # Configuration parameters: AllowAdjacentOneLineDefs, NumberOfEmptyLines.
59
+ Layout/EmptyLineBetweenDefs:
60
+ Exclude:
61
+ - 'lib/conjur/base_object.rb'
62
+ - 'lib/conjur/escape.rb'
63
+ - 'lib/conjur/id.rb'
64
+ - 'spec/has_attributes_spec.rb'
65
+
66
+ # Offense count: 6
67
+ # Cop supports --auto-correct.
68
+ Layout/EmptyLines:
69
+ Exclude:
70
+ - 'example/demo_v4.rb'
71
+ - 'example/demo_v5.rb'
72
+ - 'lib/conjur/escape.rb'
73
+ - 'spec/configuration_spec.rb'
74
+ - 'spec/spec_helper.rb'
75
+
76
+ # Offense count: 4
77
+ # Cop supports --auto-correct.
78
+ # Configuration parameters: EnforcedStyle.
79
+ # SupportedStyles: empty_lines, no_empty_lines
80
+ Layout/EmptyLinesAroundBlockBody:
81
+ Exclude:
82
+ - 'spec/api_spec.rb'
83
+ - 'spec/configuration_spec.rb'
84
+
85
+ # Offense count: 2
86
+ # Cop supports --auto-correct.
87
+ # Configuration parameters: EnforcedStyle.
88
+ # SupportedStyles: empty_lines, empty_lines_except_namespace, empty_lines_special, no_empty_lines, beginning_only, ending_only
89
+ Layout/EmptyLinesAroundClassBody:
90
+ Exclude:
91
+ - 'lib/conjur/has_attributes.rb'
92
+ - 'lib/conjur/host_factory_token.rb'
93
+
94
+ # Offense count: 10
95
+ # Cop supports --auto-correct.
96
+ # Configuration parameters: EnforcedStyle.
97
+ # SupportedStyles: empty_lines, empty_lines_except_namespace, empty_lines_special, no_empty_lines
98
+ Layout/EmptyLinesAroundModuleBody:
99
+ Exclude:
100
+ - 'lib/conjur/acts_as_role.rb'
101
+ - 'lib/conjur/acts_as_rolsource.rb'
102
+ - 'lib/conjur/api/pubkeys.rb'
103
+ - 'lib/conjur/base.rb'
104
+ - 'lib/conjur/escape.rb'
105
+ - 'lib/conjur/group.rb'
106
+ - 'lib/conjur/layer.rb'
107
+ - 'lib/conjur/policy.rb'
108
+ - 'lib/conjur/resource.rb'
109
+ - 'lib/conjur/variable.rb'
110
+
111
+ # Offense count: 12
112
+ # Cop supports --auto-correct.
113
+ # Configuration parameters: AllowForAlignment, ForceEqualSignAlignment.
114
+ Layout/ExtraSpacing:
115
+ Exclude:
116
+ - 'conjur-api.gemspec'
117
+ - 'spec/ldap_sync_spec.rb'
118
+
119
+ # Offense count: 2
120
+ # Cop supports --auto-correct.
121
+ # Configuration parameters: EnforcedStyle, IndentationWidth.
122
+ # SupportedStyles: consistent, consistent_relative_to_receiver, special_for_inner_method_call, special_for_inner_method_call_in_parentheses
123
+ Layout/IndentFirstArgument:
124
+ Exclude:
125
+ - 'spec/ssl_spec.rb'
126
+
127
+ # Offense count: 1
128
+ # Cop supports --auto-correct.
129
+ # Configuration parameters: EnforcedStyle, IndentationWidth.
130
+ # SupportedStyles: special_inside_parentheses, consistent, align_brackets
131
+ Layout/IndentFirstArrayElement:
132
+ Exclude:
133
+ - 'spec/api_spec.rb'
134
+
135
+ # Offense count: 1
136
+ # Cop supports --auto-correct.
137
+ # Configuration parameters: EnforcedStyle.
138
+ # SupportedStyles: auto_detection, squiggly, active_support, powerpack, unindent
139
+ Layout/IndentHeredoc:
140
+ Exclude:
141
+ - 'spec/configuration_spec.rb'
142
+
143
+ # Offense count: 23
144
+ # Cop supports --auto-correct.
145
+ Layout/LeadingCommentSpace:
146
+ Exclude:
147
+ - 'Gemfile'
148
+ - 'lib/conjur/api/authn.rb'
149
+ - 'lib/conjur/api/host_factories.rb'
150
+ - 'lib/conjur/api/policies.rb'
151
+ - 'lib/conjur/api/pubkeys.rb'
152
+ - 'lib/conjur/api/resources.rb'
153
+ - 'lib/conjur/api/roles.rb'
154
+ - 'lib/conjur/api/variables.rb'
155
+ - 'lib/conjur/base.rb'
156
+ - 'spec/spec_helper.rb'
157
+
158
+ # Offense count: 2
159
+ # Cop supports --auto-correct.
160
+ Layout/MultilineBlockLayout:
161
+ Exclude:
162
+ - 'spec/api_spec.rb'
163
+
164
+ # Offense count: 3
165
+ # Cop supports --auto-correct.
166
+ # Configuration parameters: EnforcedStyle, IndentationWidth.
167
+ # SupportedStyles: aligned, indented, indented_relative_to_receiver
168
+ Layout/MultilineMethodCallIndentation:
169
+ Exclude:
170
+ - 'spec/cert_utils_spec.rb'
171
+
172
+ # Offense count: 6
173
+ # Cop supports --auto-correct.
174
+ Layout/SpaceAfterComma:
175
+ Exclude:
176
+ - 'conjur-api.gemspec'
177
+ - 'lib/conjur/has_attributes.rb'
178
+ - 'spec/spec_helper.rb'
179
+
180
+ # Offense count: 5
181
+ # Cop supports --auto-correct.
182
+ # Configuration parameters: EnforcedStyle.
183
+ # SupportedStyles: space, no_space
184
+ Layout/SpaceAroundEqualsInParameterDefault:
185
+ Exclude:
186
+ - 'lib/conjur/base_object.rb'
187
+ - 'lib/conjur/configuration.rb'
188
+ - 'lib/conjur/has_attributes.rb'
189
+ - 'lib/conjur/id.rb'
190
+ - 'lib/conjur/variable.rb'
191
+
192
+ # Offense count: 21
193
+ # Cop supports --auto-correct.
194
+ # Configuration parameters: AllowForAlignment.
195
+ Layout/SpaceAroundOperators:
196
+ Exclude:
197
+ - 'conjur-api.gemspec'
198
+ - 'lib/conjur/has_attributes.rb'
199
+ - 'spec/api_spec.rb'
200
+ - 'spec/spec_helper.rb'
201
+
202
+ # Offense count: 29
203
+ # Cop supports --auto-correct.
204
+ # Configuration parameters: EnforcedStyle, EnforcedStyleForEmptyBraces.
205
+ # SupportedStyles: space, no_space
206
+ # SupportedStylesForEmptyBraces: space, no_space
207
+ Layout/SpaceBeforeBlockBraces:
208
+ Exclude:
209
+ - 'conjur-api.gemspec'
210
+ - 'lib/conjur/acts_as_role.rb'
211
+ - 'lib/conjur/configuration.rb'
212
+ - 'lib/conjur/has_attributes.rb'
213
+ - 'spec/api_spec.rb'
214
+ - 'spec/configuration_spec.rb'
215
+ - 'spec/id_spec.rb'
216
+ - 'spec/spec_helper.rb'
217
+
218
+ # Offense count: 24
219
+ # Cop supports --auto-correct.
220
+ # Configuration parameters: EnforcedStyle, EnforcedStyleForEmptyBraces, SpaceBeforeBlockParameters.
221
+ # SupportedStyles: space, no_space
222
+ # SupportedStylesForEmptyBraces: space, no_space
223
+ Layout/SpaceInsideBlockBraces:
224
+ Exclude:
225
+ - 'lib/conjur/acts_as_role.rb'
226
+ - 'lib/conjur/api/authn.rb'
227
+ - 'lib/conjur/has_attributes.rb'
228
+ - 'spec/api_spec.rb'
229
+ - 'spec/configuration_spec.rb'
230
+ - 'spec/spec_helper.rb'
231
+
232
+ # Offense count: 6
233
+ # Cop supports --auto-correct.
234
+ # Configuration parameters: EnforcedStyle.
235
+ # SupportedStyles: space, no_space
236
+ Layout/SpaceInsideParens:
237
+ Exclude:
238
+ - 'lib/conjur/acts_as_resource.rb'
239
+ - 'lib/conjur/acts_as_role.rb'
240
+
241
+ # Offense count: 5
242
+ # Cop supports --auto-correct.
243
+ # Configuration parameters: EnforcedStyle.
244
+ # SupportedStyles: final_newline, final_blank_line
245
+ Layout/TrailingBlankLines:
246
+ Exclude:
247
+ - 'Rakefile'
248
+ - 'lib/conjur/acts_as_rolsource.rb'
249
+ - 'lib/conjur/exceptions.rb'
250
+ - 'lib/conjur/log.rb'
251
+ - 'lib/conjur/log_source.rb'
252
+
253
+ # Offense count: 93
254
+ # Cop supports --auto-correct.
255
+ # Configuration parameters: AllowInHeredoc.
256
+ Layout/TrailingWhitespace:
257
+ Enabled: false
258
+
259
+ # Offense count: 1
260
+ Lint/AmbiguousOperator:
261
+ Exclude:
262
+ - 'lib/conjur/acts_as_role.rb'
263
+
264
+ # Offense count: 1
265
+ Lint/AmbiguousRegexpLiteral:
266
+ Exclude:
267
+ - 'lib/conjur/cert_utils.rb'
268
+
269
+ # Offense count: 1
270
+ # Configuration parameters: AllowSafeAssignment.
271
+ Lint/AssignmentInCondition:
272
+ Exclude:
273
+ - 'lib/conjur/acts_as_role.rb'
274
+
275
+ # Offense count: 10
276
+ Lint/ImplicitStringConcatenation:
277
+ Exclude:
278
+ - 'spec/cert_utils_spec.rb'
279
+ - 'spec/configuration_spec.rb'
280
+ - 'spec/ssl_spec.rb'
281
+
282
+ # Offense count: 8
283
+ Lint/ParenthesesAsGroupedExpression:
284
+ Exclude:
285
+ - 'spec/api_spec.rb'
286
+ - 'spec/configuration_spec.rb'
287
+
288
+ # Offense count: 1
289
+ # Cop supports --auto-correct.
290
+ Lint/ScriptPermission:
291
+ Exclude:
292
+ - 'Rakefile'
293
+
294
+ # Offense count: 2
295
+ Lint/ShadowingOuterLocalVariable:
296
+ Exclude:
297
+ - 'lib/conjur/api/resources.rb'
298
+ - 'lib/conjur/configuration.rb'
299
+
300
+ # Offense count: 1
301
+ # Cop supports --auto-correct.
302
+ Lint/UnneededSplatExpansion:
303
+ Exclude:
304
+ - 'lib/conjur/api/resources.rb'
305
+
306
+ # Offense count: 21
307
+ # Cop supports --auto-correct.
308
+ # Configuration parameters: AllowUnusedKeywordArguments, IgnoreEmptyMethods.
309
+ Lint/UnusedMethodArgument:
310
+ Exclude:
311
+ - 'lib/conjur/api.rb'
312
+ - 'lib/conjur/api/router/v4.rb'
313
+ - 'lib/conjur/api/router/v5.rb'
314
+ - 'lib/conjur/base_object.rb'
315
+ - 'lib/conjur/cache.rb'
316
+ - 'lib/conjur/has_attributes.rb'
317
+ - 'lib/conjur/host_factory_token.rb'
318
+ - 'lib/conjur/id.rb'
319
+ - 'lib/conjur/log_source.rb'
320
+ - 'spec/has_attributes_spec.rb'
321
+
322
+ # Offense count: 1
323
+ Lint/UriEscapeUnescape:
324
+ Exclude:
325
+ - 'lib/conjur/escape.rb'
326
+
327
+ # Offense count: 4
328
+ Lint/UselessAssignment:
329
+ Exclude:
330
+ - 'features/step_definitions/policy_steps.rb'
331
+ - 'lib/conjur/acts_as_role.rb'
332
+ - 'spec/ssl_spec.rb'
333
+
334
+ # Offense count: 5
335
+ Metrics/AbcSize:
336
+ Max: 41
337
+
338
+ # Offense count: 1
339
+ # Configuration parameters: CountComments, ExcludedMethods.
340
+ # ExcludedMethods: refine
341
+ Metrics/BlockLength:
342
+ Max: 27
343
+
344
+ # Offense count: 1
345
+ # Configuration parameters: CountComments.
346
+ Metrics/ClassLength:
347
+ Max: 112
348
+
349
+ # Offense count: 2
350
+ Metrics/CyclomaticComplexity:
351
+ Max: 13
352
+
353
+ # Offense count: 9
354
+ # Configuration parameters: CountComments.
355
+ Metrics/MethodLength:
356
+ Max: 34
357
+
358
+ # Offense count: 2
359
+ # Configuration parameters: CountComments.
360
+ Metrics/ModuleLength:
361
+ Max: 112
362
+
363
+ # Offense count: 2
364
+ Metrics/PerceivedComplexity:
365
+ Max: 15
366
+
367
+ # Offense count: 2
368
+ # Configuration parameters: EnforcedStyleForLeadingUnderscores.
369
+ # SupportedStylesForLeadingUnderscores: disallowed, required, optional
370
+ Naming/MemoizedInstanceVariableName:
371
+ Exclude:
372
+ - 'lib/conjur/configuration.rb'
373
+ - 'lib/conjur/has_attributes.rb'
374
+
375
+ # Offense count: 1
376
+ # Cop supports --auto-correct.
377
+ Performance/StringReplacement:
378
+ Exclude:
379
+ - 'spec/cert_utils_spec.rb'
380
+
381
+ # Offense count: 2
382
+ Security/Eval:
383
+ Exclude:
384
+ - 'features/step_definitions/api_steps.rb'
385
+ - 'features_v4/step_definitions/api_steps.rb'
386
+
387
+ # Offense count: 1
388
+ # Cop supports --auto-correct.
389
+ # Configuration parameters: AutoCorrect.
390
+ Security/JSONLoad:
391
+ Exclude:
392
+ - 'lib/conjur/base.rb'
393
+
394
+ # Offense count: 1
395
+ # Cop supports --auto-correct.
396
+ # Configuration parameters: EnforcedStyle.
397
+ # SupportedStyles: prefer_alias, prefer_alias_method
398
+ Style/Alias:
399
+ Exclude:
400
+ - 'lib/conjur/api.rb'
401
+
402
+ # Offense count: 12
403
+ # Cop supports --auto-correct.
404
+ # Configuration parameters: EnforcedStyle, ProceduralMethods, FunctionalMethods, IgnoredMethods.
405
+ # SupportedStyles: line_count_based, semantic, braces_for_chaining
406
+ # ProceduralMethods: benchmark, bm, bmbm, create, each_with_object, measure, new, realtime, tap, with_object
407
+ # FunctionalMethods: let, let!, subject, watch
408
+ # IgnoredMethods: lambda, proc, it
409
+ Style/BlockDelimiters:
410
+ Exclude:
411
+ - 'spec/api_spec.rb'
412
+ - 'spec/configuration_spec.rb'
413
+ - 'spec/has_attributes_spec.rb'
414
+
415
+ # Offense count: 6
416
+ # Cop supports --auto-correct.
417
+ # Configuration parameters: EnforcedStyle.
418
+ # SupportedStyles: braces, no_braces, context_dependent
419
+ Style/BracesAroundHashParameters:
420
+ Exclude:
421
+ - 'spec/api_spec.rb'
422
+ - 'spec/has_attributes_spec.rb'
423
+
424
+ # Offense count: 3
425
+ # Cop supports --auto-correct.
426
+ # Configuration parameters: AutoCorrect, EnforcedStyle.
427
+ # SupportedStyles: nested, compact
428
+ Style/ClassAndModuleChildren:
429
+ Exclude:
430
+ - 'lib/conjur/api.rb'
431
+ - 'lib/conjur/query_string.rb'
432
+
433
+ # Offense count: 2
434
+ # Cop supports --auto-correct.
435
+ # Configuration parameters: EnforcedStyle.
436
+ # SupportedStyles: is_a?, kind_of?
437
+ Style/ClassCheck:
438
+ Exclude:
439
+ - 'lib/conjur/api/variables.rb'
440
+ - 'lib/conjur/cidr.rb'
441
+
442
+ # Offense count: 5
443
+ Style/ClassVars:
444
+ Exclude:
445
+ - 'lib/conjur/cache.rb'
446
+ - 'lib/conjur/log.rb'
447
+
448
+ # Offense count: 3
449
+ # Cop supports --auto-correct.
450
+ Style/ColonMethodCall:
451
+ Exclude:
452
+ - 'spec/log_spec.rb'
453
+
454
+ # Offense count: 1
455
+ Style/DateTime:
456
+ Exclude:
457
+ - 'lib/conjur/host_factory_token.rb'
458
+
459
+ # Offense count: 23
460
+ Style/Documentation:
461
+ Enabled: false
462
+
463
+ # Offense count: 3
464
+ # Cop supports --auto-correct.
465
+ Style/EmptyLiteral:
466
+ Exclude:
467
+ - 'lib/conjur/configuration.rb'
468
+ - 'spec/configuration_spec.rb'
469
+ - 'spec/has_attributes_spec.rb'
470
+
471
+ # Offense count: 1
472
+ # Cop supports --auto-correct.
473
+ Style/Encoding:
474
+ Exclude:
475
+ - 'conjur-api.gemspec'
476
+
477
+ # Offense count: 1
478
+ # Cop supports --auto-correct.
479
+ Style/ExpandPathArguments:
480
+ Exclude:
481
+ - 'conjur-api.gemspec'
482
+
483
+ # Offense count: 76
484
+ # Cop supports --auto-correct.
485
+ # Configuration parameters: EnforcedStyle.
486
+ # SupportedStyles: when_needed, always, never
487
+ Style/FrozenStringLiteralComment:
488
+ Enabled: false
489
+
490
+ # Offense count: 29
491
+ # Configuration parameters: AllowedVariables.
492
+ Style/GlobalVars:
493
+ Exclude:
494
+ - 'features/step_definitions/policy_steps.rb'
495
+ - 'features/support/env.rb'
496
+ - 'features/support/hooks.rb'
497
+ - 'features_v4/step_definitions/api_steps.rb'
498
+ - 'features_v4/support/env.rb'
499
+
500
+ # Offense count: 4
501
+ # Configuration parameters: MinBodyLength.
502
+ Style/GuardClause:
503
+ Exclude:
504
+ - 'lib/conjur/api.rb'
505
+ - 'lib/conjur/configuration.rb'
506
+ - 'lib/conjur/log.rb'
507
+ - 'lib/conjur/log_source.rb'
508
+
509
+ # Offense count: 7
510
+ # Cop supports --auto-correct.
511
+ # Configuration parameters: EnforcedStyle, UseHashRocketsWithSymbolValues, PreferHashRocketsForNonAlnumEndingSymbols.
512
+ # SupportedStyles: ruby19, hash_rockets, no_mixed_keys, ruby19_no_mixed_keys
513
+ Style/HashSyntax:
514
+ Exclude:
515
+ - 'Rakefile'
516
+ - 'spec/api_spec.rb'
517
+ - 'spec/configuration_spec.rb'
518
+ - 'spec/ldap_sync_spec.rb'
519
+
520
+ # Offense count: 10
521
+ # Cop supports --auto-correct.
522
+ Style/IfUnlessModifier:
523
+ Exclude:
524
+ - 'features/step_definitions/api_steps.rb'
525
+ - 'features_v4/step_definitions/api_steps.rb'
526
+ - 'lib/conjur/api/authn.rb'
527
+ - 'lib/conjur/cidr.rb'
528
+ - 'lib/conjur/has_attributes.rb'
529
+ - 'lib/conjur/routing.rb'
530
+
531
+ # Offense count: 23
532
+ # Cop supports --auto-correct.
533
+ # Configuration parameters: EnforcedStyle.
534
+ # SupportedStyles: require_parentheses, require_no_parentheses, require_no_parentheses_except_multiline
535
+ Style/MethodDefParentheses:
536
+ Exclude:
537
+ - 'lib/conjur/acts_as_resource.rb'
538
+ - 'lib/conjur/acts_as_rolsource.rb'
539
+ - 'lib/conjur/acts_as_user.rb'
540
+ - 'lib/conjur/api.rb'
541
+ - 'lib/conjur/api/router/v5.rb'
542
+ - 'lib/conjur/configuration.rb'
543
+ - 'lib/conjur/escape.rb'
544
+ - 'lib/conjur/has_attributes.rb'
545
+ - 'lib/conjur/host_factory_token.rb'
546
+ - 'lib/conjur/log_source.rb'
547
+ - 'lib/conjur/role_grant.rb'
548
+
549
+ # Offense count: 2
550
+ # Cop supports --auto-correct.
551
+ # Configuration parameters: EnforcedStyle.
552
+ # SupportedStyles: module_function, extend_self
553
+ Style/ModuleFunction:
554
+ Exclude:
555
+ - 'lib/conjur/api/router/v4.rb'
556
+ - 'lib/conjur/api/router/v5.rb'
557
+
558
+ # Offense count: 1
559
+ Style/MultilineBlockChain:
560
+ Exclude:
561
+ - 'spec/cert_utils_spec.rb'
562
+
563
+ # Offense count: 9
564
+ # Cop supports --auto-correct.
565
+ Style/MutableConstant:
566
+ Exclude:
567
+ - 'lib/conjur-api/version.rb'
568
+ - 'spec/spec_helper.rb'
569
+
570
+ # Offense count: 2
571
+ # Cop supports --auto-correct.
572
+ # Configuration parameters: Whitelist.
573
+ # Whitelist: be, be_a, be_an, be_between, be_falsey, be_kind_of, be_instance_of, be_truthy, be_within, eq, eql, end_with, include, match, raise_error, respond_to, start_with
574
+ Style/NestedParenthesizedCalls:
575
+ Exclude:
576
+ - 'spec/id_spec.rb'
577
+
578
+ # Offense count: 2
579
+ # Cop supports --auto-correct.
580
+ # Configuration parameters: AutoCorrect, EnforcedStyle.
581
+ # SupportedStyles: predicate, comparison
582
+ Style/NumericPredicate:
583
+ Exclude:
584
+ - 'spec/**/*'
585
+ - 'lib/conjur/cidr.rb'
586
+
587
+ # Offense count: 3
588
+ # Cop supports --auto-correct.
589
+ # Configuration parameters: PreferredDelimiters.
590
+ Style/PercentLiteralDelimiters:
591
+ Exclude:
592
+ - 'conjur-api.gemspec'
593
+ - 'spec/api_spec.rb'
594
+
595
+ # Offense count: 1
596
+ # Cop supports --auto-correct.
597
+ Style/PerlBackrefs:
598
+ Exclude:
599
+ - 'lib/conjur/api.rb'
600
+
601
+ # Offense count: 1
602
+ # Cop supports --auto-correct.
603
+ # Configuration parameters: EnforcedStyle.
604
+ # SupportedStyles: compact, exploded
605
+ Style/RaiseArgs:
606
+ Exclude:
607
+ - 'lib/conjur/api.rb'
608
+
609
+ # Offense count: 4
610
+ # Cop supports --auto-correct.
611
+ Style/RedundantBegin:
612
+ Exclude:
613
+ - 'lib/conjur/acts_as_resource.rb'
614
+ - 'lib/conjur/acts_as_role.rb'
615
+ - 'lib/conjur/cert_utils.rb'
616
+ - 'lib/conjur/configuration.rb'
617
+
618
+ # Offense count: 2
619
+ # Cop supports --auto-correct.
620
+ # Configuration parameters: AllowMultipleReturnValues.
621
+ Style/RedundantReturn:
622
+ Exclude:
623
+ - 'lib/conjur/base.rb'
624
+ - 'lib/conjur/cidr.rb'
625
+
626
+ # Offense count: 10
627
+ # Cop supports --auto-correct.
628
+ Style/RedundantSelf:
629
+ Exclude:
630
+ - 'lib/conjur/base.rb'
631
+ - 'lib/conjur/configuration.rb'
632
+ - 'lib/conjur/host_factory.rb'
633
+ - 'lib/conjur/host_factory_token.rb'
634
+
635
+ # Offense count: 1
636
+ # Cop supports --auto-correct.
637
+ # Configuration parameters: AllowAsExpressionSeparator.
638
+ Style/Semicolon:
639
+ Exclude:
640
+ - 'lib/conjur/api/authn.rb'
641
+
642
+ # Offense count: 2
643
+ # Cop supports --auto-correct.
644
+ # Configuration parameters: EnforcedStyle.
645
+ # SupportedStyles: only_raise, only_fail, semantic
646
+ Style/SignalException:
647
+ Exclude:
648
+ - 'lib/conjur/api/resources.rb'
649
+ - 'lib/conjur/cidr.rb'
650
+
651
+ # Offense count: 13
652
+ # Cop supports --auto-correct.
653
+ # Configuration parameters: AllowIfMethodIsEmpty.
654
+ Style/SingleLineMethods:
655
+ Exclude:
656
+ - 'lib/conjur/base_object.rb'
657
+ - 'lib/conjur/cache.rb'
658
+ - 'lib/conjur/has_attributes.rb'
659
+ - 'lib/conjur/id.rb'
660
+ - 'spec/has_attributes_spec.rb'
661
+
662
+ # Offense count: 3
663
+ # Cop supports --auto-correct.
664
+ # Configuration parameters: .
665
+ # SupportedStyles: use_perl_names, use_english_names
666
+ Style/SpecialGlobalVars:
667
+ EnforcedStyle: use_perl_names
668
+
669
+ # Offense count: 3
670
+ # Cop supports --auto-correct.
671
+ # Configuration parameters: MinSize.
672
+ # SupportedStyles: percent, brackets
673
+ Style/SymbolArray:
674
+ EnforcedStyle: brackets
675
+
676
+ # Offense count: 1
677
+ # Cop supports --auto-correct.
678
+ # Configuration parameters: EnforcedStyleForMultiline.
679
+ # SupportedStylesForMultiline: comma, consistent_comma, no_comma
680
+ Style/TrailingCommaInArrayLiteral:
681
+ Exclude:
682
+ - 'spec/roles_spec.rb'
683
+
684
+ # Offense count: 1
685
+ # Cop supports --auto-correct.
686
+ # Configuration parameters: EnforcedStyleForMultiline.
687
+ # SupportedStylesForMultiline: comma, consistent_comma, no_comma
688
+ Style/TrailingCommaInHashLiteral:
689
+ Exclude:
690
+ - 'spec/cidr_spec.rb'
691
+
692
+ # Offense count: 2
693
+ # Cop supports --auto-correct.
694
+ Style/UnneededPercentQ:
695
+ Exclude:
696
+ - 'conjur-api.gemspec'
697
+
698
+ # Offense count: 2
699
+ # Cop supports --auto-correct.
700
+ Style/UnpackFirst:
701
+ Exclude:
702
+ - 'features/support/world.rb'
703
+ - 'features_v4/support/world.rb'
704
+
705
+ # Offense count: 537
706
+ # Configuration parameters: AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, IgnoredPatterns.
707
+ # URISchemes: http, https
708
+ Metrics/LineLength:
709
+ Max: 1247
data/.yardopts ADDED
@@ -0,0 +1 @@
1
+ --hide-void-return --markup markdown --no-private --hide-api private lib/**/*.rb