zendesk_apps_support 4.49.0 → 4.50.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/config/locales/en.yml +0 -5
- data/config/locales/translations/zendesk_apps_support.yml +2 -0
- data/lib/zendesk_apps_support/manifest/parameter.rb +1 -1
- data/lib/zendesk_apps_support/package.rb +1 -2
- data/lib/zendesk_apps_support/validations/manifest.rb +4 -28
- data/lib/zendesk_apps_support/validations/secure_settings.rb +1 -5
- data/lib/zendesk_apps_support/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 4c15ea4bafff914946cdb8690a7357447f9b02c91806fa7b4fec6766c1a327b7
|
|
4
|
+
data.tar.gz: 167ba11debabf6de1dc4d76a772e36dbf6b9c9753dce174a36866783c124b5ce
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 79359a73f2af9256af3337be7696561bd213b9dd842cd7d46c867a694216adfe715a8c4523c477cfadc34d7a1b5cea00088cb850b9eca781e119cc0fd74803ba
|
|
7
|
+
data.tar.gz: 86d32a1526b471ccbd78c83a71f6fda82b2546c5317be74d92f409ed984b8089a9ee16e24c2a97ad607a171ba0cad767c4a967f49ac5a12d9aac8ba55a479ca7
|
data/config/locales/en.yml
CHANGED
|
@@ -268,9 +268,6 @@ en:
|
|
|
268
268
|
do not match products in translations (%{translation_products})
|
|
269
269
|
insecure_token_parameter_in_manifest: 'Make sure to set secure to true
|
|
270
270
|
when using keys in Settings. Learn more: %{link}'
|
|
271
|
-
password_parameter_deprecated: 'Password parameter type is deprecated
|
|
272
|
-
and will not be accepted in the future. Use Basic Access Authentication
|
|
273
|
-
instead. Learn more: %{link}.'
|
|
274
271
|
default_secure_or_hidden_parameter_in_manifest: Default values for secure
|
|
275
272
|
or hidden parameters are not stored securely. Be sure to review them
|
|
276
273
|
and confirm they do not contain sensitive data
|
|
@@ -298,8 +295,6 @@ en:
|
|
|
298
295
|
oauth_parameter_cannot_be_secure: oauth parameter cannot be set to be
|
|
299
296
|
secure.
|
|
300
297
|
invalid_url: '%{field} must be a valid URL, got "%{value}".'
|
|
301
|
-
password_parameter_type_deprecated: 'Password parameter type can no longer
|
|
302
|
-
be used. Use Secure settings instead. Learn more: %{link}.'
|
|
303
298
|
field_requires_secure_parameter: "%{field} cannot be defined in a non-secure
|
|
304
299
|
parameter."
|
|
305
300
|
field_cannot_be_empty: "%{field} cannot be empty."
|
|
@@ -591,6 +591,7 @@ parts:
|
|
|
591
591
|
title: "Validation message to indicate deprecated password parameter is being used. Do not translate 'Password'."
|
|
592
592
|
value: "Password parameter type is deprecated and will not be accepted in the future. Use Basic Access Authentication instead. Learn more: %{link}."
|
|
593
593
|
screenshot: "https://drive.google.com/file/d/1S2cecD3h1pIoc5mpG-D966B0gHNlRvhz"
|
|
594
|
+
obsolete: "2026-08-31"
|
|
594
595
|
- translation:
|
|
595
596
|
key: "txt.apps.admin.error.app_build.translation.default_secure_or_hidden_parameter_in_manifest"
|
|
596
597
|
title: "Validation message to indicate that a hidden or secure manifest parameter has a default value. Do not translate 'secure' and 'hidden'. Secure(true) in manifest refers to https://developer.zendesk.com/apps/docs/developer-guide/using_sdk#using-secure-settings"
|
|
@@ -656,6 +657,7 @@ parts:
|
|
|
656
657
|
key: "txt.apps.admin.error.app_build.password_parameter_type_deprecated"
|
|
657
658
|
title: "App builder job: Password parameter type is deprecated"
|
|
658
659
|
value: "Password parameter type can no longer be used. Use Secure settings instead. Learn more: %{link}."
|
|
660
|
+
obesolete: "2026-08-31"
|
|
659
661
|
- translation:
|
|
660
662
|
key: "txt.apps.admin.error.app_build.field_requires_secure_parameter"
|
|
661
663
|
title: "App builder job: Error when parameter field requires secure setting set to true. Placeholder %{field} shows parameter field along with parameter name like \"parameter[name='param'].scopes\" found in the supplied manifest file."
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
module ZendeskAppsSupport
|
|
4
4
|
class Manifest
|
|
5
5
|
class Parameter
|
|
6
|
-
TYPES = %w[text
|
|
6
|
+
TYPES = %w[text checkbox url number multiline hidden oauth].freeze
|
|
7
7
|
ATTRIBUTES = %i[name type required secure default scopes].freeze
|
|
8
8
|
attr_reader(*ATTRIBUTES)
|
|
9
9
|
def default?
|
|
@@ -34,10 +34,9 @@ module ZendeskAppsSupport
|
|
|
34
34
|
def validate(options = {})
|
|
35
35
|
marketplace = options.fetch(:marketplace, true)
|
|
36
36
|
skip_marketplace_translations = options.fetch(:skip_marketplace_translations, false)
|
|
37
|
-
error_on_password_parameter = options.fetch(:error_on_password_parameter, false)
|
|
38
37
|
|
|
39
38
|
errors = []
|
|
40
|
-
errors << Validations::Manifest.call(self
|
|
39
|
+
errors << Validations::Manifest.call(self)
|
|
41
40
|
|
|
42
41
|
if has_valid_manifest?(errors)
|
|
43
42
|
errors << Validations::Marketplace.call(self) if marketplace
|
|
@@ -14,7 +14,7 @@ module ZendeskAppsSupport
|
|
|
14
14
|
SECURE_PARAM_SCOPES = %w[header body url jwt_secret_key jwt_claim basic_auth_username basic_auth_password].freeze
|
|
15
15
|
|
|
16
16
|
class << self
|
|
17
|
-
def call(package
|
|
17
|
+
def call(package)
|
|
18
18
|
unless package.has_file?('manifest.json')
|
|
19
19
|
nested_manifest = package.files.find { |file| file =~ %r{\A[^/]+?/manifest\.json\Z} }
|
|
20
20
|
if nested_manifest
|
|
@@ -22,10 +22,7 @@ module ZendeskAppsSupport
|
|
|
22
22
|
end
|
|
23
23
|
return [ValidationError.new(:missing_manifest)]
|
|
24
24
|
end
|
|
25
|
-
|
|
26
|
-
package.warnings << password_parameter_warning if !error_on_password_parameter && password_param_present?(package.manifest)
|
|
27
|
-
|
|
28
|
-
collate_manifest_errors(package, error_on_password_parameter)
|
|
25
|
+
collate_manifest_errors(package)
|
|
29
26
|
rescue JSON::ParserError => e
|
|
30
27
|
return [ValidationError.new(:manifest_not_json, errors: e)]
|
|
31
28
|
rescue ZendeskAppsSupport::Manifest::OverrideError => e
|
|
@@ -34,11 +31,7 @@ module ZendeskAppsSupport
|
|
|
34
31
|
|
|
35
32
|
private
|
|
36
33
|
|
|
37
|
-
def
|
|
38
|
-
manifest.parameters.any? { |p| p.type == 'password' }
|
|
39
|
-
end
|
|
40
|
-
|
|
41
|
-
def collate_manifest_errors(package, error_on_password_parameter)
|
|
34
|
+
def collate_manifest_errors(package)
|
|
42
35
|
manifest = package.manifest
|
|
43
36
|
|
|
44
37
|
errors = [
|
|
@@ -56,10 +49,7 @@ module ZendeskAppsSupport
|
|
|
56
49
|
missing_framework_version(manifest),
|
|
57
50
|
invalid_version_error(manifest) ]
|
|
58
51
|
end,
|
|
59
|
-
ban_no_template(manifest)
|
|
60
|
-
if error_on_password_parameter
|
|
61
|
-
[ deprecate_password_parameter_type(manifest) ]
|
|
62
|
-
end
|
|
52
|
+
ban_no_template(manifest)
|
|
63
53
|
]
|
|
64
54
|
errors.flatten.compact
|
|
65
55
|
end
|
|
@@ -252,13 +242,6 @@ module ZendeskAppsSupport
|
|
|
252
242
|
ValidationError.new(:no_framework_version_required) unless manifest.framework_version.nil?
|
|
253
243
|
end
|
|
254
244
|
|
|
255
|
-
def deprecate_password_parameter_type(manifest)
|
|
256
|
-
secure_settings_link = 'https://developer.zendesk.com/documentation/apps/app-developer-guide/making-api-requests-from-a-zendesk-app/#using-secure-settings'
|
|
257
|
-
if password_param_present?(manifest)
|
|
258
|
-
ValidationError.new(:password_parameter_type_deprecated, link: secure_settings_link)
|
|
259
|
-
end
|
|
260
|
-
end
|
|
261
|
-
|
|
262
245
|
def private_marketing_app_error(manifest)
|
|
263
246
|
ValidationError.new(:marketing_only_app_cant_be_private) if manifest.private?
|
|
264
247
|
end
|
|
@@ -491,13 +474,6 @@ module ZendeskAppsSupport
|
|
|
491
474
|
rescue URI::InvalidURIError
|
|
492
475
|
false
|
|
493
476
|
end
|
|
494
|
-
|
|
495
|
-
def password_parameter_warning
|
|
496
|
-
I18n.t(
|
|
497
|
-
'txt.apps.admin.error.app_build.translation.password_parameter_deprecated',
|
|
498
|
-
link: 'https://developer.zendesk.com/documentation/apps/app-developer-guide/making-api-requests-from-a-zendesk-app/#using-basic-access-authentication'
|
|
499
|
-
)
|
|
500
|
-
end
|
|
501
477
|
end
|
|
502
478
|
end
|
|
503
479
|
end
|
|
@@ -27,11 +27,7 @@ module ZendeskAppsSupport
|
|
|
27
27
|
end
|
|
28
28
|
|
|
29
29
|
def insecure_param?(parameter)
|
|
30
|
-
parameter.name =~ SECURABLE_KEYWORDS_REGEXP &&
|
|
31
|
-
end
|
|
32
|
-
|
|
33
|
-
def type_password_or_text?(parameter_type)
|
|
34
|
-
parameter_type == 'text' || parameter_type == 'password'
|
|
30
|
+
parameter.name =~ SECURABLE_KEYWORDS_REGEXP && parameter.type == 'text' && !parameter.secure
|
|
35
31
|
end
|
|
36
32
|
|
|
37
33
|
def hidden_default_parameter_warning
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: zendesk_apps_support
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 4.
|
|
4
|
+
version: 4.50.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- James A. Rosen
|
|
@@ -11,7 +11,7 @@ authors:
|
|
|
11
11
|
autorequire:
|
|
12
12
|
bindir: bin
|
|
13
13
|
cert_chain: []
|
|
14
|
-
date: 2026-04-
|
|
14
|
+
date: 2026-04-30 00:00:00.000000000 Z
|
|
15
15
|
dependencies:
|
|
16
16
|
- !ruby/object:Gem::Dependency
|
|
17
17
|
name: i18n
|