Repository: minio/minio (language: go)

Issue:
SOS API (Veeam) system.xml is not compatible with Veeam
## Expected Behavior

Veeam recognizes MinIO as providing SOS API, but it does not.

## Current Behavior

Manually requesting the system.xml object works, but there are some errors in it, which is why Veeam does not accept it.

## Possible Solution

<div class="table-wrap">

XML Tag | Change | Description
-- | -- | --
ProtocolVersion | add enclosing double quotes | That's how it is described in the documentation and it's not working without it.
ModelName | add enclosing double quotes | That's how it is described in the documentation and recommended by Veeam (even if it is currently working without it).
APIEndpoints | remove this tag including subtags | The tag is optional. Since IAM and STS processing is not supported it should be removed.
SystemRecommendations | remove this tag including subtags | The tag is optional and should not be there, unless there are differences in Veeam defaults that have been previously discussed with Veeam.

</div>


<p></p>

I'll submit a pull request.


## Steps to Reproduce (for bugs)
<!--- Provide a link to a live example, or an unambiguous set of steps to -->
<!--- reproduce this bug. Include code to reproduce, if relevant -->
<!--- and make sure you have followed https://github.com/minio/minio/tree/release/docs/debugging to capture relevant logs -->

1. Follow "Appendix C: Manual plug-in load test" of the "Veeam Smart Object Storage API SOSAPI v1.0" available in the Veeam partner portal
2. Notice that in the last step "If everything was implemented correctly you will the capacity information when you create a new backup job" does not work i.e. no capacity is displayed.

After the changes I propose, the capacity is displayed correctly.

## Context
<!--- How has this issue affected you? What are you trying to accomplish? -->
<!--- Providing context helps us come up with a solution that is most useful in the real world -->

## Regression
<!-- Is this issue a regression? (Yes / No) -->
<!-- If Yes, optionally please include minio version or commit id or PR# that caused this regression, if you have these details. -->

## Your Environment
<!--- Include as many relevant details about the environment you experienced the bug in -->
* Version used (`minio --version`): RELEASE.2023-05-04T21-44-30Z
* Server setup and configuration:
* Operating System and version (`uname -a`):


Discussion / hints:

Fix patch:
diff --git a/cmd/veeam-sos-api.go b/cmd/veeam-sos-api.go
index 008e41b8dd2dd..47d99d84167ec 100644
--- a/cmd/veeam-sos-api.go
+++ b/cmd/veeam-sos-api.go
@@ -76,6 +76,11 @@ import (
 // - The object should be present in all buckets accessed by Veeam products that want to leverage the SOSAPI functionality.
 //
 // - The current protocol version is 1.0.
+type apiEndpoints struct {
+	IAMEndpoint string `xml:"IAMEndpoint"`
+	STSEndpoint string `xml:"STSEndpoint"`
+}
+
 type systemInfo struct {
 	XMLName              xml.Name `xml:"SystemInfo" json:"-"`
 	ProtocolVersion      string   `xml:"ProtocolVersion"`
@@ -85,14 +90,11 @@ type systemInfo struct {
 		UploadSessions bool `xml:"UploadSessions"`
 		IAMSTS         bool `xml:"IAMSTS"`
 	} `mxl:"ProtocolCapabilities"`
-	APIEndpoints struct {
-		IAMEndpoint string `xml:"IAMEndpoint"`
-		STSEndpoint string `xml:"STSEndpoint"`
-	} `xml:"APIEndpoints"`
+	APIEndpoints          *apiEndpoints `xml:"APIEndpoints,omitempty"`
 	SystemRecommendations struct {
-		S3ConcurrentTaskLimit    int `xml:"S3ConcurrentTaskLimit"`
-		S3MultiObjectDeleteLimit int `xml:"S3MultiObjectDeleteLimit"`
-		StorageCurrentTaskLimit  int `xml:"StorageCurrentTaskLimit"`
+		S3ConcurrentTaskLimit    int `xml:"S3ConcurrentTaskLimit,omitempty"`
+		S3MultiObjectDeleteLimit int `xml:"S3MultiObjectDeleteLimit,omitempty"`
+		StorageCurrentTaskLimit  int `xml:"StorageCurrentTaskLimit,omitempty"`
 		KBBlockSize              int `xml:"KbBlockSize"`
 	} `xml:"SystemRecommendations"`
 }
@@ -118,8 +120,8 @@ func veeamSOSAPIGetObject(ctx context.Context, bucket, object string, rs *HTTPRa
 	switch object {
 	case systemXMLObject:
 		si := systemInfo{
-			ProtocolVersion: "1.0",
-			ModelName:       "MinIO " + ReleaseTag,
+			ProtocolVersion: `"1.0"`,
+			ModelName:       "\"MinIO " + ReleaseTag + "\"",
 		}
 		si.ProtocolCapabilities.CapacityInfo = true
 


Test patch: