ruby-jss 5.1.0 → 5.2.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/CHANGES.md +23 -1
- data/lib/jamf/api/classic/api_objects/mdm.rb +1 -1
- data/lib/jamf/api/connection/attributes.rb +4 -8
- data/lib/jamf/api/connection/connect.rb +2 -2
- data/lib/jamf/api/connection/constants.rb +2 -1
- data/lib/jamf/api/connection/token.rb +4 -0
- data/lib/jamf/api/jamf_pro/api_objects/j_package.rb +6 -3
- data/lib/jamf/version.rb +1 -1
- metadata +6 -6
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 7bb6dedd3be4370cdf20cd8fc64f14490fd4f5b2dc1c50acd41f036a05330d76
|
|
4
|
+
data.tar.gz: bd298a9b9bf6c7274ebd37107ac3cc1e6078fabbe2123b366e87deea13ce73a8
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 97a7752e567052b6fb70b61196d8b4c36fc6fc9023707c0a868d3b5045e0e777c3efe3b65a03c9e5a24ae022aad5c8fda00767eff502be260b51e8909f43c772
|
|
7
|
+
data.tar.gz: 79c1e7cefa2e8fb7617bdcacb4396fb2703da8589d9b267e5507a13cbe8784b83d0c28fcedc7122e6a279020e79129a6e11e7c8033e6aa4648f8ec32429daca8
|
data/CHANGES.md
CHANGED
|
@@ -14,6 +14,29 @@ __Please update all installations of ruby-jss to at least v1.6.0.__
|
|
|
14
14
|
|
|
15
15
|
Many many thanks to actae0n of Blacksun Hackers Club for reporting this issue and providing examples of how it could be exploited.
|
|
16
16
|
|
|
17
|
+
--------
|
|
18
|
+
## \[5.2.0] 2026-12-03
|
|
19
|
+
|
|
20
|
+
### Added
|
|
21
|
+
|
|
22
|
+
- `Jamf::JPackage#deploy_via_mdm` now takes a `url:` parameter. Use this to provide as one-time manifest URL for the MDM deployment of this pkg, overriding the URL in the stored manifest. This is useful (and needed) when using, e.g. Signed URLs to access .pkgs stored in AWS/S3.
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
--------
|
|
27
|
+
## \[5.1.1] 2026-11-13
|
|
28
|
+
|
|
29
|
+
### Changed
|
|
30
|
+
|
|
31
|
+
- Sticky Sessions improvements:
|
|
32
|
+
- Sticky sessions can be used regardless of the Jamf Pro server hostname, it doesn't need to end with
|
|
33
|
+
'jamfcloud.com'. If the server is not a cloud server, activating sticky sessions has no effect.
|
|
34
|
+
- ruby-jss now recognizes both possible stickey-session cookie names, 'jpro-ingress' and 'APBALANCEID'
|
|
35
|
+
|
|
36
|
+
### Fixed
|
|
37
|
+
|
|
38
|
+
- Sticky session cookies are retrieved from the current Jamf Pro API Connection, not the default one, which does not work for standalone connection objects.
|
|
39
|
+
|
|
17
40
|
--------
|
|
18
41
|
## \[5.1.0] 2026-08-04
|
|
19
42
|
|
|
@@ -28,7 +51,6 @@ Many many thanks to actae0n of Blacksun Hackers Club for reporting this issue an
|
|
|
28
51
|
- When using Zeitwerk's 'eager loading' to load the whole gem, no longer fails looking for the JamfProtectPlan OAPISchema, referenced by other schemas
|
|
29
52
|
- Fixed occasional arg-parsing errors with `.all_names` API object class method.
|
|
30
53
|
|
|
31
|
-
|
|
32
54
|
--------
|
|
33
55
|
## \[5.0.2] 2026-01-24
|
|
34
56
|
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
module Jamf
|
|
10
10
|
|
|
11
11
|
# This module should be mixed in to Jamf::Computer and Jamf::MobileDevice
|
|
12
|
-
#
|
|
12
|
+
# and Jamf::ComputerGroup and Jamf::MobileDeviceGroup.
|
|
13
13
|
#
|
|
14
14
|
# Those must define the following constants:
|
|
15
15
|
# - MDM_COMMAND_TARGET - one of :computers, :computergroups, :mobiledevices, :mobiledevicegroups
|
|
@@ -71,26 +71,22 @@ module Jamf
|
|
|
71
71
|
|
|
72
72
|
##########################################
|
|
73
73
|
|
|
74
|
-
# Turn sticky-sessions on or off.
|
|
75
|
-
# server, with a hostname ending with Jamf::Connection::JAMFCLOUD_DOMAIN
|
|
74
|
+
# Turn sticky-sessions on or off.
|
|
76
75
|
#
|
|
77
76
|
# @param value [Boolean] should we use a sticky session?
|
|
78
77
|
#
|
|
79
78
|
# @return [void]
|
|
80
79
|
#
|
|
81
80
|
def sticky_session=(value)
|
|
82
|
-
@sticky_session
|
|
81
|
+
@sticky_session = false unless defined? @sticky_session
|
|
83
82
|
|
|
84
83
|
# convert boolean-y to boolean
|
|
85
|
-
value = value
|
|
86
|
-
|
|
84
|
+
value = !!value
|
|
87
85
|
return if @sticky_session == value
|
|
88
86
|
|
|
89
87
|
if value
|
|
90
|
-
|
|
91
|
-
|
|
88
|
+
enable_sticky_session @jp_cnx.head.headers
|
|
92
89
|
@sticky_session = true
|
|
93
|
-
enable_sticky_session Jamf.cnx.jp_cnx.head.headers
|
|
94
90
|
|
|
95
91
|
else
|
|
96
92
|
@sticky_session = false
|
|
@@ -232,9 +232,9 @@ module Jamf
|
|
|
232
232
|
|
|
233
233
|
# attribute name and value are separated by '='
|
|
234
234
|
cookie_name, cookie_value = cookie_data.split('=')
|
|
235
|
-
next unless
|
|
235
|
+
next unless Jamf::Connection::STICKY_SESSION_COOKIE_NAMES.include? cookie_name
|
|
236
236
|
|
|
237
|
-
@sticky_session_cookie = "#{
|
|
237
|
+
@sticky_session_cookie = "#{cookie_name}=#{cookie_value}"
|
|
238
238
|
jp_cnx.headers[Jamf::Connection::COOKIE_HEADER] = @sticky_session_cookie
|
|
239
239
|
c_cnx.headers[Jamf::Connection::COOKIE_HEADER] = @sticky_session_cookie
|
|
240
240
|
return @sticky_session_cookie
|
|
@@ -550,7 +550,11 @@ module Jamf
|
|
|
550
550
|
#################################
|
|
551
551
|
def parse_token_from_api_client_auth(resp)
|
|
552
552
|
@token_response_body = resp.body
|
|
553
|
+
raise Jamf::AuthenticationError, 'Token Reponse Body malformed!' unless @token_response_body.is_a? Hash
|
|
554
|
+
|
|
553
555
|
@token = @token_response_body[:access_token]
|
|
556
|
+
raise Jamf::AuthenticationError, 'Token Reponse Body missing access_token!' unless @token
|
|
557
|
+
|
|
554
558
|
@expires = Time.now + @token_response_body[:expires_in] - 1
|
|
555
559
|
@api_role_ids = @token_response_body[:scope].split(' ').map { |r| r.split(':').last }
|
|
556
560
|
@valid = true
|
|
@@ -269,7 +269,7 @@ module Jamf
|
|
|
269
269
|
# Looks like:
|
|
270
270
|
# {
|
|
271
271
|
# :id=>"10392",
|
|
272
|
-
# :href=>"https://
|
|
272
|
+
# :href=>"https://jamf.host.com/api/v1/packages/10392/upload/10392"
|
|
273
273
|
# :time=>2025-09-01 12:00:00 -0700
|
|
274
274
|
# }
|
|
275
275
|
# see #upload
|
|
@@ -791,12 +791,15 @@ module Jamf
|
|
|
791
791
|
#
|
|
792
792
|
# @param group_id [Integer] The id of the computer group to deploy to
|
|
793
793
|
#
|
|
794
|
+
# @param url [String] a custom URL to use in the manifest, rather than that stored
|
|
795
|
+
# with the Package object. Use this for, e.g. AWS/S3 'signed' urls
|
|
796
|
+
#
|
|
794
797
|
# @param managed [Boolean] Should the installed package be managed by Jamf Pro?
|
|
795
798
|
# Defaults to false. This seems to be for App Store apps only??
|
|
796
799
|
#
|
|
797
800
|
# @return [Hash] the response from the server. see #deploy_response
|
|
798
801
|
##############################
|
|
799
|
-
def deploy_via_mdm(computer_ids: nil, group_id: nil, managed: false)
|
|
802
|
+
def deploy_via_mdm(computer_ids: nil, group_id: nil, url: nil, managed: false)
|
|
800
803
|
raise ArgumentError, 'No computer_ids or group_id provided' unless computer_ids || group_id
|
|
801
804
|
raise Jamf::MissingDataError, 'No manifest set for this package' if manifest.to_s.empty?
|
|
802
805
|
raise Jamf::NoSuchItemError, 'This package has no id, it must be saved in Jamf Pro before uploading' unless exist?
|
|
@@ -807,7 +810,7 @@ module Jamf
|
|
|
807
810
|
# manifest data for the MDMDeploy command, which is a hash.
|
|
808
811
|
# hopefully some day Jamf will just use the manifest for the pkg
|
|
809
812
|
mdm_manifest = {}
|
|
810
|
-
mdm_manifest['url'] = manifest_url_for_deployment(parsed_manifest)
|
|
813
|
+
mdm_manifest['url'] = url || manifest_url_for_deployment(parsed_manifest)
|
|
811
814
|
mdm_manifest['hash'], mdm_manifest['hashType'] = manifest_checksum_for_deployment(parsed_manifest)
|
|
812
815
|
mdm_manifest['bundleId'] = manifest_bundle_identifier_for_deployment(parsed_manifest)
|
|
813
816
|
mdm_manifest['bundleVersion'] = manifest_bundle_version_for_deployment(parsed_manifest)
|
data/lib/jamf/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: ruby-jss
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 5.
|
|
4
|
+
version: 5.2.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Chris Lasell
|
|
8
8
|
- Aurica Hayes
|
|
9
|
-
autorequire:
|
|
9
|
+
autorequire:
|
|
10
10
|
bindir: bin
|
|
11
11
|
cert_chain: []
|
|
12
|
-
date: 2026-
|
|
12
|
+
date: 2026-12-03 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
|
14
14
|
- !ruby/object:Gem::Dependency
|
|
15
15
|
name: pixar-ruby-extensions
|
|
@@ -542,7 +542,7 @@ metadata:
|
|
|
542
542
|
source_code_uri: https://github.com/PixarAnimationStudios/ruby-jss
|
|
543
543
|
changelog_uri: https://github.com/PixarAnimationStudios/ruby-jss/blob/master/CHANGES.md
|
|
544
544
|
wiki_uri: https://github.com/PixarAnimationStudios/ruby-jss/wiki
|
|
545
|
-
post_install_message:
|
|
545
|
+
post_install_message:
|
|
546
546
|
rdoc_options:
|
|
547
547
|
- "--title"
|
|
548
548
|
- Jamf
|
|
@@ -562,8 +562,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
562
562
|
- !ruby/object:Gem::Version
|
|
563
563
|
version: '0'
|
|
564
564
|
requirements: []
|
|
565
|
-
rubygems_version: 3.
|
|
566
|
-
signing_key:
|
|
565
|
+
rubygems_version: 3.3.11
|
|
566
|
+
signing_key:
|
|
567
567
|
specification_version: 4
|
|
568
568
|
summary: A Ruby interface to the Jamf Pro REST APIs
|
|
569
569
|
test_files: []
|