{"record":{"id":"d89e303b8aec0733","repo":"microsoft/aspire","slug":"aspireradius082","errorCode":"ASPIRERADIUS082","errorMessage":"Resource '{resource.Name}' would be deployed with the user name 'guest', which RabbitMQ restricts to loopback connections — the deployed broker would reject every workload that connects to it. Supply an explicit user name, for example AddRabbitMQ(\"{resource.Name}\", userName: builder.AddParameter(\"{resource.Name}user\")), so the same value is both provisioned on the broker and composed into the connection string. Diagnostic: ASPIRERADIUS082.","messagePattern":"Resource '(.+?)' would be deployed with the user name 'guest', which RabbitMQ restricts to loopback connections — the deployed broker would reject every workload that connects to it\\. Supply an explicit user name, for example AddRabbitMQ\\(\"(.+?)\", userName: builder\\.AddParameter\\(\"(.+?)user\"\\)\\), so the same value is both provisioned on the broker and composed into the connection string\\. Diagnostic: ASPIRERADIUS082\\.","errorType":"error_code","errorClass":"RadiusBackingResourceProjectionException","httpStatus":null,"severity":"error","filePath":"src/Aspire.Hosting.Radius/Publishing/RadiusDeploymentPipelineStep.cs","lineNumber":685,"sourceCode":"        var annotation = annotations.Last();\n        var parameters = annotation.Parameters;\n        var rabbitMqUserNames = annotation.RabbitMqUserNames;\n        if (parameters.Count == 0)\n        {\n            return null;\n        }\n\n        // ARM JSON deployment parameter file:\n        //   { \"$schema\": \"...\", \"contentVersion\": \"1.0.0.0\",\n        //     \"parameters\": { \"<bicepParam>\": { \"value\": \"<resolved>\" } } }\n        var parametersNode = new JsonObject();\n        foreach (var (identifier, parameter) in parameters)\n        {\n            var value = await parameter.GetValueAsync(cancellationToken).ConfigureAwait(false) ?? string.Empty;\n            if (rabbitMqUserNames.TryGetValue(parameter, out var rabbitMqOwners) &&\n                string.Equals(value, \"guest\", StringComparison.Ordinal))\n            {\n                throw RadiusInfrastructureBuilder.CreateRabbitMqGuestUserNameException(rabbitMqOwners[0]);\n            }\n\n            parametersNode[identifier] = new JsonObject { [\"value\"] = value };\n        }\n\n        var document = new JsonObject\n        {\n            [\"$schema\"] = \"https://schema.management.azure.com/schemas/2019-04-01/deploymentParameters.json#\",\n            [\"contentVersion\"] = \"1.0.0.0\",\n            [\"parameters\"] = parametersNode,\n        };\n\n        // CreateTempSubdirectory creates the directory with owner-only permissions (0700) on Unix.\n        var directory = Directory.CreateTempSubdirectory(\"radius-deploy-\");\n        var filePath = Path.Combine(directory.FullName, \"parameters.json\");\n        try\n        {\n            await File.WriteAllTextAsync(","sourceCodeStart":667,"sourceCodeEnd":703,"githubUrl":"https://github.com/microsoft/aspire/blob/25830f84bd145686607ad00c057b3f84e2e51d43/src/Aspire.Hosting.Radius/Publishing/RadiusDeploymentPipelineStep.cs#L667-L703","documentation":"While writing the deploy parameters file, WriteDeployParametersFileAsync resolves each parameter value and throws this error if a parameter known to be a RabbitMQ user name resolves to the literal 'guest'. RabbitMQ restricts 'guest' to loopback connections, so a broker deployed with that user name would reject every remote workload. The guard (diagnostic ASPIRERADIUS082) fails fast at publish time and tells you to supply an explicit parameterized user name via AddRabbitMQ.","triggerScenarios":"Running the Radius deployment step where a parameter identified as a RabbitMQ resource's user name (via rabbitMqUserNames tracking) resolves to \"guest\" — e.g., AddRabbitMQ called without a userName argument or with a parameter whose default value is the literal 'guest'.","commonSituations":"Using the default parameter value for the RabbitMQ user name; an appsettings/environment value supplying 'guest'; copying a sample that hard-codes 'guest'; generating Bicep for an existing app where the connection string uses guest/ guest locally.","solutions":["Pass an explicit userName parameter to AddRabbitMQ and set a non-'guest' value for it (e.g., via builder.AddParameter with a default or prompt)","Change the parameter's resolved value (appsettings, environment variable, or .env) from 'guest' to a real user name","Ensure the same parameter feeds both the broker provisioning and the connection string so credentials stay in sync","If 'guest' is intentional for local-only use, exclude that resource from Radius deployment or document a deployment-specific credential"],"exampleFix":"// before\nvar rabbit = builder.AddRabbitMQ(\"messaging\");\n\n// after\nvar rabbitUser = builder.AddParameter(\"messaginguser\");\nvar rabbitPassword = builder.AddParameter(\"messagingpassword\", secret: true);\nvar rabbit = builder.AddRabbitMQ(\"messaging\", userName: rabbitUser, password: rabbitPassword);","handlingStrategy":"validation","validationCode":"// Ensure the RabbitMQ user-name parameter never resolves to 'guest'\nvar rabbitUser = builder.AddParameter(\"messaginguser\");\n// Fail fast in local checks:\nvar value = await rabbitUser.GetValueAsync(ct);\nif (value == \"guest\") throw new InvalidOperationException(\"RabbitMQ user name must not be 'guest' for Radius deployment.\");","typeGuard":"bool IsDeployableRabbitUserName(string? v) => !string.IsNullOrEmpty(v) && v != \"guest\";","tryCatchPattern":"try\n{\n    await step.ExecuteAsync(context, ct);\n}\ncatch (Exception ex) when (ex.Message.Contains(\"ASPIRERADIUS082\"))\n{\n    logger.LogError(\"Replace the 'guest' RabbitMQ user name with an explicit parameter before deploying.\");\n    throw;\n}","preventionTips":["Always pass an explicit userName parameter to AddRabbitMQ","Never use RabbitMQ's default 'guest' account outside localhost testing","Wire the same parameter into connection strings so provisioned and consumed credentials match"],"tags":["rabbitmq","radius","deployment","credentials","diagnostics"],"backgroundTag":"rabbitmq-guest-user","analyzedSha":"25830f84bd145686607ad00c057b3f84e2e51d43","analyzedAt":"2026-09-16T11:10:06.193Z","contentChangedAt":"2026-09-16T11:10:06.193Z","schemaVersion":2},"datasetVersion":"2026-09-21T04:17:39.646Z"}