Uploaded image for project: 'RH-SSO'
  1. RH-SSO
  2. RHSSO-895

Securing Apps Guide: Misleading dependencies instructions for Node.js adapter

    XMLWordPrintable

Details

    Description

      There are several issues in dependency installation instructions for Node.js adapter regarding both product and community version of the docs.

      Product only

      The product version of Node.js adapter is distributed as a ZIP file named "rh-sso-
      {{book.project.version}}-nodejs-adapter.zip" (e.g. "rh-sso-7.1.0-nodejs-adapter.zip").

      Inside this ZIP there's a TGZ named "keycloak-connect-
      {{book.project.versionMvn}}-redhat-1.tgz" (e.g. "keycloak-connect-2.5.4-Final-redhat-1.tgz")

      Currently, there's this code snippet the docs:

      dependencies": {
          "keycloak-connect": "file:rh-sso-7.1.0-nodejs-adapter.tgz"
      }
      

      This is incorrect. Instead, it should be similar to this:

      "dependencies": {
          "keycloak-connect": "file:keycloak-connect-2.5.4-Final-redhat-1.tgz"
      }
      

      So it should use "keycloak-connect" instead of "rh-sso" and book.project.versionMvn instead of book.project.version.

      Both product and community

      1. Versioning

      Actually, we can't use variable book.project.versionMvn with Node.js adapter at all.
      Node.js adapter use a bit different version names than RH-SSO/Keycloak.

      RH-SSO versions use dot "." between version number (2.4.0) and release (Final-redhat-1), e.g. 2.4.0.Final-redhat-1. This is the content of book.project.versionMvn.

      Node.js adapter versions on the other hand use dash "-" between version number and release, e.g. 2.4.0-Final-redhat-1.

      So we need to add an extra variable for Node.js adapter version.

      This is used in dependency definition both in product and community guide.

      2. Missing quote sign before "dependencies" keyword

      In the example there's missing quote sign before the dependencies keyword

      Summary

      The proposed changes are to add a new version variable for Node.js adapter and change the docs similarly to this:

      {% if book.community %}
      
      [source,json,subs="attributes"]
      ----
          "dependencies": {
              "keycloak-connect": "{{book.project.versionNodejs}}"
          }
      ----
      
      {% endif %}
      
      {% if book.product %}
      
      [source,json,subs="attributes"]
      ----
          "dependencies": {
              "keycloak-connect": "file:keycloak-connect-{{book.project.versionNodejs}}.tgz"
          }
      ----
      
      {% endif %}
      

      Attachments

        Issue Links

          Activity

            People

              rh_vmuzikar Václav Muzikář
              rh_vmuzikar Václav Muzikář
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: