Skip to content

Commit

Permalink
change payg localhost product indentifier (#9306)
Browse files Browse the repository at this point in the history
Signed-off-by: Ricardo Mateus <[email protected]>
  • Loading branch information
rjmateus authored Sep 27, 2024
1 parent 72d0d53 commit f6ddffd
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -262,6 +262,18 @@ private CloudRMTCredentials processAndGetCloudRMTCredentials(PaygSshData instanc


if (paygData.getHeaderAuth() != null) {
if (instance.isSUSEManagerPayg()) {
// On SUSE Manager 5.0 we need to allow synchronize SUMA older version, like 4.3
// SUMA 4.3 is a base product, means it also grants access to sles15sp4 base channels
// To access older suma version we are using the authentication credentials collected from localhost
// Localhost is sle-micro, and with those headers we cannot access SLES channels needed for 4.3
// To overcome this we are forcing the header for OS identifier to be the ones used in suma 4.3
// With the version set to 5.0
// Then Public Team cloud team can detect that this is a SUMA machine,
// with the right credentials and grant the needed access to all the channels
paygData.getHeaderAuth().put("X-Instance-Identifier", "SUSE-Manager-Server");
paygData.getHeaderAuth().put("X-Instance-Version", "5.1");
}
credentials.setExtraAuthData(GSON.toJson(paygData.getHeaderAuth()).getBytes());
}
credentials.setPaygSshData(instance);
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
- Change localhost PAYG header to match SUSE Manager product

0 comments on commit f6ddffd

Please sign in to comment.