conversant 1.0.17 → 1.0.18
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/CHANGELOG.md +20 -0
 - data/lib/conversant/v3/services/portal.rb +10 -13
 - data/lib/conversant/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: b40e1ec2641cec2c860a7de9bb7a5bb9ff8a85bde847cf9520139f288c9883c3
         
     | 
| 
      
 4 
     | 
    
         
            +
              data.tar.gz: 9c15c4e3153aad9d60782fe748e3e4324ba573307b6ba91f357be9d78cfab3d1
         
     | 
| 
       5 
5 
     | 
    
         
             
            SHA512:
         
     | 
| 
       6 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       7 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 6 
     | 
    
         
            +
              metadata.gz: ea35d31fc8722f9955e620fb285fe8376fa57a72d18da0a1de12f44de82cff8ad71f76a0c0ce30b50a63faab4cccccdf095867df19ecf4f841762d7f64da07bc
         
     | 
| 
      
 7 
     | 
    
         
            +
              data.tar.gz: 04f3fed5093b6388c9e66b7991542fe459cbd2b59dec0d50ad21b7de5e358f7f25445cd9617c748236d1b2ced8cc71aea03a7083b05ea4fccf4a75bf6cc87223
         
     | 
    
        data/CHANGELOG.md
    CHANGED
    
    | 
         @@ -5,6 +5,26 @@ All notable changes to this project will be documented in this file. 
     | 
|
| 
       5 
5 
     | 
    
         
             
            The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
         
     | 
| 
       6 
6 
     | 
    
         
             
            and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
         
     | 
| 
       7 
7 
     | 
    
         | 
| 
      
 8 
     | 
    
         
            +
            ## [1.0.18] - 2025-10-08
         
     | 
| 
      
 9 
     | 
    
         
            +
             
     | 
| 
      
 10 
     | 
    
         
            +
            ### Fixed
         
     | 
| 
      
 11 
     | 
    
         
            +
            - **Portal Service Authentication**: Fixed SESSION cookie handling to use root sessions directly
         
     | 
| 
      
 12 
     | 
    
         
            +
              - Portal service now uses root SESSION + SSO_GW_SESSION2 cookies directly instead of attempting to exchange them
         
     | 
| 
      
 13 
     | 
    
         
            +
              - Removed incorrect cookie extraction from response (Portal doesn't return a new SESSION cookie)
         
     | 
| 
      
 14 
     | 
    
         
            +
              - Changed from extracting `response.cookies['SESSION']` to using `sessions[:session]` from SSO login
         
     | 
| 
      
 15 
     | 
    
         
            +
              - Resolves "NO_SESSION_IN_RESPONSE" error when calling `portal.appliances`
         
     | 
| 
      
 16 
     | 
    
         
            +
              - Matches original implementation behavior where root sessions are used for all Portal API calls
         
     | 
| 
      
 17 
     | 
    
         
            +
             
     | 
| 
      
 18 
     | 
    
         
            +
            ### Changed
         
     | 
| 
      
 19 
     | 
    
         
            +
            - Updated `Portal#fetch_new_session` method to return root SESSION cookie directly after verification
         
     | 
| 
      
 20 
     | 
    
         
            +
            - Test call to `#{portal_endpoint}/?cId=#{customer_id}` now only validates session instead of extracting cookies
         
     | 
| 
      
 21 
     | 
    
         
            +
            - Log message changed from "REQUESTING_SESSION" to "USING_ROOT_SESSIONS" for clarity
         
     | 
| 
      
 22 
     | 
    
         
            +
             
     | 
| 
      
 23 
     | 
    
         
            +
            ### Impact
         
     | 
| 
      
 24 
     | 
    
         
            +
            - Portal service now works correctly without "Missing SESSION for Portal" errors
         
     | 
| 
      
 25 
     | 
    
         
            +
            - `portal.appliances` and other Portal API methods now authenticate properly
         
     | 
| 
      
 26 
     | 
    
         
            +
            - Consistent with other services (CDN, LMS, VMS) that also exchange sessions but Portal uses root sessions directly
         
     | 
| 
      
 27 
     | 
    
         
            +
             
     | 
| 
       8 
28 
     | 
    
         
             
            ## [1.0.17] - 2025-10-01
         
     | 
| 
       9 
29 
     | 
    
         | 
| 
       10 
30 
     | 
    
         
             
            ### Fixed
         
     | 
| 
         @@ -146,17 +146,18 @@ module Conversant 
     | 
|
| 
       146 
146 
     | 
    
         
             
                    # Fetches a new SESSION cookie for Portal API access
         
     | 
| 
       147 
147 
     | 
    
         
             
                    #
         
     | 
| 
       148 
148 
     | 
    
         
             
                    # Authenticates with root portal sessions (SESSION + SSO_GW_SESSION2) and
         
     | 
| 
       149 
     | 
    
         
            -
                    #  
     | 
| 
       150 
     | 
    
         
            -
                    #  
     | 
| 
      
 149 
     | 
    
         
            +
                    # uses them directly for Portal API calls. Makes a test call to verify
         
     | 
| 
      
 150 
     | 
    
         
            +
                    # the sessions are valid.
         
     | 
| 
       151 
151 
     | 
    
         
             
                    #
         
     | 
| 
       152 
152 
     | 
    
         
             
                    # @return [String, nil] The SESSION cookie value, or nil if authentication fails
         
     | 
| 
       153 
153 
     | 
    
         
             
                    def fetch_new_session
         
     | 
| 
       154 
154 
     | 
    
         
             
                      sessions = authenticate
         
     | 
| 
       155 
155 
     | 
    
         
             
                      return nil unless sessions && sessions[:session] && sessions[:sso_gw_session2]
         
     | 
| 
       156 
156 
     | 
    
         | 
| 
       157 
     | 
    
         
            -
                      logger.debug "#{identifier}.METHOD:authorize. 
     | 
| 
      
 157 
     | 
    
         
            +
                      logger.debug "#{identifier}.METHOD:authorize.USING_ROOT_SESSIONS"
         
     | 
| 
       158 
158 
     | 
    
         | 
| 
       159 
     | 
    
         
            -
                       
     | 
| 
      
 159 
     | 
    
         
            +
                      # Make a test call to verify sessions are valid
         
     | 
| 
      
 160 
     | 
    
         
            +
                      RestClient.get(
         
     | 
| 
       160 
161 
     | 
    
         
             
                        "#{portal_endpoint}/?cId=#{customer_id}",
         
     | 
| 
       161 
162 
     | 
    
         
             
                        {
         
     | 
| 
       162 
163 
     | 
    
         
             
                          authority: URI.parse(portal_endpoint).hostname,
         
     | 
| 
         @@ -171,15 +172,11 @@ module Conversant 
     | 
|
| 
       171 
172 
     | 
    
         
             
                        }
         
     | 
| 
       172 
173 
     | 
    
         
             
                      )
         
     | 
| 
       173 
174 
     | 
    
         | 
| 
       174 
     | 
    
         
            -
                       
     | 
| 
       175 
     | 
    
         
            -
             
     | 
| 
       176 
     | 
    
         
            -
             
     | 
| 
       177 
     | 
    
         
            -
             
     | 
| 
       178 
     | 
    
         
            -
             
     | 
| 
       179 
     | 
    
         
            -
                      else
         
     | 
| 
       180 
     | 
    
         
            -
                        logger.error "#{identifier}.METHOD:authorize.NO_SESSION_IN_RESPONSE"
         
     | 
| 
       181 
     | 
    
         
            -
                        nil
         
     | 
| 
       182 
     | 
    
         
            -
                      end
         
     | 
| 
      
 175 
     | 
    
         
            +
                      # Cache and return the root SESSION cookie
         
     | 
| 
      
 176 
     | 
    
         
            +
                      session_cookie = sessions[:session]
         
     | 
| 
      
 177 
     | 
    
         
            +
                      redis.set(session_cache_key, session_cookie, ex: configuration.cache_ttl)
         
     | 
| 
      
 178 
     | 
    
         
            +
                      logger.debug "#{identifier}.METHOD:authorize.SESSION_OBTAINED"
         
     | 
| 
      
 179 
     | 
    
         
            +
                      session_cookie
         
     | 
| 
       183 
180 
     | 
    
         
             
                    rescue RestClient::Unauthorized, RestClient::Forbidden => e
         
     | 
| 
       184 
181 
     | 
    
         
             
                      logger.error "#{identifier}.METHOD:authorize.AUTH_ERROR:#{e.message}"
         
     | 
| 
       185 
182 
     | 
    
         
             
                      nil
         
     | 
    
        data/lib/conversant/version.rb
    CHANGED
    
    
    
        metadata
    CHANGED
    
    | 
         @@ -1,14 +1,14 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            --- !ruby/object:Gem::Specification
         
     | 
| 
       2 
2 
     | 
    
         
             
            name: conversant
         
     | 
| 
       3 
3 
     | 
    
         
             
            version: !ruby/object:Gem::Version
         
     | 
| 
       4 
     | 
    
         
            -
              version: 1.0. 
     | 
| 
      
 4 
     | 
    
         
            +
              version: 1.0.18
         
     | 
| 
       5 
5 
     | 
    
         
             
            platform: ruby
         
     | 
| 
       6 
6 
     | 
    
         
             
            authors:
         
     | 
| 
       7 
7 
     | 
    
         
             
            - Tho Nguyen
         
     | 
| 
       8 
8 
     | 
    
         
             
            autorequire:
         
     | 
| 
       9 
9 
     | 
    
         
             
            bindir: exe
         
     | 
| 
       10 
10 
     | 
    
         
             
            cert_chain: []
         
     | 
| 
       11 
     | 
    
         
            -
            date: 2025-10- 
     | 
| 
      
 11 
     | 
    
         
            +
            date: 2025-10-08 00:00:00.000000000 Z
         
     | 
| 
       12 
12 
     | 
    
         
             
            dependencies:
         
     | 
| 
       13 
13 
     | 
    
         
             
            - !ruby/object:Gem::Dependency
         
     | 
| 
       14 
14 
     | 
    
         
             
              name: json
         
     |