Skip to content

Commit 6c9eae3

Browse files
sk593Copilot
andcommitted
Remove read-only secrets property from Radius.Messaging/rabbitMQ schema
The rabbitMQ schema exposed a read-only `secrets` object (name/password) that surfaced the Recipe's managed fallback secret. Remove that property so the type describes the broker password solely through the supplied `Radius.Security/secrets` resource passed on `password`. Update the type description, README, and test app comment to match. The Kubernetes Recipe still generates a random password for the broker when `password` is omitted; only the surfaced read-only property is removed. Related to radius-project/radius#12688. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Signed-off-by: sk593 <shruthikumar@microsoft.com>
1 parent ebdeec9 commit 6c9eae3

3 files changed

Lines changed: 11 additions & 30 deletions

File tree

Messaging/rabbitMQ/README.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,9 @@ Developer documentation is embedded in the resource type definition YAML file an
1414
| `application` | string | Optional | The Radius Application ID. |
1515
| `queue` | string | Optional | The name of the queue to pre-provision on the broker. The Recipe creates this durable queue when the broker starts. Defaults to `jobs`. |
1616
| `username` | string | Optional | The username the broker is provisioned with. Defaults to `radius`. Avoid `guest` (loopback-only in RabbitMQ). Not sensitive; exposed as a read-only connection value. |
17-
| `password` | string | Optional | The resource ID of a `Radius.Security/secrets` resource containing the broker password under key `password`. If omitted, the Kubernetes Recipe generates a random password and returns it through a managed secret. |
17+
| `password` | string | Optional | The resource ID of a `Radius.Security/secrets` resource containing the broker password under key `password`. If omitted, the Kubernetes Recipe generates a random password for the broker. |
1818
| `host` | string | Read only | The host name used to connect to the broker. Set from the Recipe's Service DNS name. |
1919
| `port` | integer | Read only | The port used to connect to the broker over AMQP 0-9-1 (5672). Set from the Recipe's output. |
20-
| `secrets` | object | Read only | Managed Recipe secrets created when `password` is omitted. Use `secrets.name` as the `secretName` and `password` as the key in a container `secretKeyRef`. |
2120

2221
## Recipe Packs
2322

@@ -30,4 +29,4 @@ Recipes for this resource type are provided through the platform Recipe Packs at
3029

3130
## Using the resource type
3231

33-
Add a `rabbitMQ` resource and connect a container to it. You can provide the ID of a `Radius.Security/secrets` resource through `password`; the broker uses its materialized Kubernetes Secret directly. If you omit `password`, the Kubernetes Recipe creates broker credentials with a random fallback and Radius materializes the same value into a managed `Radius.Security/secrets` resource. Bind the supplied or generated secret with a container `secretKeyRef` using key `password`. Radius injects the queue's non-secret connection properties as `CONNECTION_<CONNECTION-NAME>_<PROPERTY-NAME>` variables. See [`test/app.bicep`](test/app.bicep) for a complete fallback example.
32+
Add a `rabbitMQ` resource and connect a container to it. Provide the ID of a `Radius.Security/secrets` resource through `password`; the broker uses its materialized Kubernetes Secret directly, and you bind the same secret into your workload with a container `secretKeyRef` using key `password`. If you omit `password`, the Kubernetes Recipe generates a random password for the broker. Radius injects the queue's non-secret connection properties as `CONNECTION_<CONNECTION-NAME>_<PROPERTY-NAME>` variables. See [`test/app.bicep`](test/app.bicep) for a complete example.

Messaging/rabbitMQ/rabbitMQ.yaml

Lines changed: 8 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,10 @@ types:
1111
that speaks AMQP 0-9-1. It allows developers to create and connect to a queue
1212
as part of their Radius applications.
1313
14-
You can provision the broker password by creating a `Radius.Security/secrets`
15-
resource and passing its resource ID on the optional `password` property. If
16-
omitted, the Kubernetes Recipe generates a random password and returns it
17-
through the resource's managed secrets. In both cases, the password is mounted
18-
into the broker via `secretKeyRef`.
14+
You provide the broker password by creating a `Radius.Security/secrets`
15+
resource and passing its resource ID on the optional `password` property. When
16+
omitted, the Kubernetes Recipe generates a random password for the broker. The
17+
password is mounted into the broker via `secretKeyRef`.
1918
```bicep
2019
@secure()
2120
param password string
@@ -54,10 +53,9 @@ types:
5453
- CONNECTION_RABBITMQ_PORT
5554
- CONNECTION_RABBITMQ_USERNAME
5655
57-
When `password` is supplied, bind the same `Radius.Security/secrets` resource
58-
into the workload. When it is omitted, bind the Recipe-generated managed
59-
secret using `queue.properties.secrets.name` as the `secretName`. In both cases,
60-
use key `password`.
56+
To read the password from your workload, supply a `Radius.Security/secrets`
57+
resource on `password` and bind that same resource into the workload with a
58+
`secretKeyRef` using key `password`.
6159
6260
apiVersions:
6361
'2025-08-01-preview':
@@ -80,7 +78,7 @@ types:
8078
description: "(Optional) The username the broker is provisioned with and that clients authenticate as. Defaults to `radius` if not provided. Avoid `guest`, which RabbitMQ restricts to loopback connections. The username is not sensitive and is exposed as a read-only connection value."
8179
password:
8280
type: string
83-
description: "(Optional) The resource ID of the `Radius.Security/secrets` resource that holds the broker password under the data key `password`. Set to `<secretResource>.id`. If omitted, the Kubernetes Recipe generates a random password and returns it through the managed `secrets.password` output."
81+
description: "(Optional) The resource ID of the `Radius.Security/secrets` resource that holds the broker password under the data key `password`. Set to `<secretResource>.id`. If omitted, the Kubernetes Recipe generates a random password for the broker."
8482
host:
8583
type: string
8684
description: (Read Only) The host name used to connect to the broker. Mapped from the recipe's Service DNS name.
@@ -89,19 +87,4 @@ types:
8987
type: integer
9088
description: (Read Only) The port used to connect to the broker over AMQP 0-9-1 (5672). Mapped from the recipe's output.
9189
readOnly: true
92-
secrets:
93-
type: object
94-
description: >-
95-
(Read Only) Recipe-generated secrets. The reserved `name` sub-property references
96-
the managed Radius.Security/secrets resource Radius materializes from the Recipe's
97-
`outputs.secrets`. Consumers bind a key into a container env var via `secretKeyRef`.
98-
properties:
99-
name:
100-
type: string
101-
readOnly: true
102-
description: (Read Only) Name of the managed Radius.Security/secrets resource. Use as `secretName` in a container `secretKeyRef`.
103-
password:
104-
type: string
105-
readOnly: true
106-
description: (Read Only) The Recipe-generated fallback password, delivered through the managed secret when the `password` input is omitted.
10790
required: [environment]

Messaging/rabbitMQ/test/app.bicep

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,7 @@ resource app 'Radius.Core/applications@2025-08-01-preview' = {
1616

1717
// The broker password is supplied via a Radius.Security/secrets resource and its ID
1818
// is passed on the rabbitMQ `password` property. When `password` is omitted, the
19-
// Recipe instead generates a random fallback and returns it through the resource's
20-
// own managed Radius.Security/secrets resource (queue.properties.secrets).
19+
// Recipe instead generates a random password for the broker.
2120
resource rabbitmqSecret 'Radius.Security/secrets@2025-08-01-preview' = {
2221
name: 'rabbitmq-credentials'
2322
properties: {

0 commit comments

Comments
 (0)