You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Update Get-CosmosDbEntraIdToken to output correct SecureString - Fixes#511 (#512)
* Add new prompts for GitHub issue creation, specification file generation, and LLM updates; update CosmosDB module requirements and improve README for Entra ID authentication
* Enhance specification prompt for Generative AI and update changelog; fix Convert-CosmosDbSecureStringToString for proper pipelining in PowerShell
* Update changelog and improve error handling in Get-CosmosDbEntraIdToken; enhance Convert-CosmosDbSecureStringToString parameter handling and add tests for pipeline usage
* Update Az.Accounts to 5.0.0 and Az.Resources to 8.0.0 for compatibility with latest features
* Update Az.Accounts to 5.1.0 for compatibility with latest features
* Update module requirements for Az.Accounts and Az.Resources; enhance verbose logging in Get-CosmosDbEntraIdToken and update localization strings
* Refactor Cosmos DB integration tests to remove insecure token conversion; enhance verbose logging for role assignments and context creation
* Update module requirements for Az.Accounts to 5.0.0 and Az.Resources to 8.0.0; adjust changelog and README for compatibility
Create a GitHub Issue in this GitHub repo using the `create_issue` tool for a feature request to implement the specification in the spec file [${input:SpecFile}](../spec/${input:SpecFile}) using the GitHub Issue template [feature_request.yml](../ISSUE_TEMPLATE/feature_request.yml).
7
+
If the issue already exists, you should update it with the latest information from the spec file.
8
+
The specification file contains the details of the feature request, including the problem statement, proposed solution, and any additional context or requirements and should be clearly identified in the GitHub issue title.
9
+
The issue should be clear, concise, and structured to facilitate understanding and implementation by the development team.
10
+
It should only apply changes that are neccessary to implement the specification file and not any other changes that are not required because they are already implemented.
Your goal is to create a new specification file for `${input:SpecPurpose}`related to this CosmosDB PowerShel module.
6
+
Your goal is to create a new specification file for `${input:SpecPurpose}`for this PowerShell Module for managing and interacting with Azur Comsos DB.
7
7
The specification file must define the requirements, constraints, and interfaces for the solution components in a manner that is clear, unambiguous, and structured for effective use by Generative AIs. Follow established documentation standards and ensure the content is machine-readable and self-contained.
8
8
The specification should be saved in the [/spec/](/spec/) directory and named according to the following convention: `[a-z0-9-]+.md`, where the name should be descriptive of the specification's content and starting with the highlevel purpose, which is one of [schema, tool, data, infrastructure, process, architecture, or design].
9
9
The file should be formatted in well formed Markdown.
@@ -17,13 +17,20 @@ The file should be formatted in well formed Markdown.
17
17
- Include examples and edge cases where applicable.
18
18
- Ensure the document is self-contained and does not rely on external context.
19
19
20
-
The specification must follow the template below, ensuring that all sections are filled out appropriately.
20
+
The specification must follow the template below, ensuring that all sections are filled out appropriately. The front matter for the MD should be structured correctly as per the example following:
21
+
```Markdown
22
+
---
23
+
title: [Concise Title Describing the Specification's Focus]
24
+
version: [Optional: e.g., 1.0, Date]
25
+
date_created: [YYYY-MM-DD]
26
+
last_updated: [Optional: YYYY-MM-DD]
27
+
owner: [Optional: Team/Individual responsible for this spec]
28
+
tags: [Optional: List of relevant tags or categories, e.g., `infrastructure`, `process`, `design`, `app` etc]
29
+
---
21
30
22
-
# Specification: [Concise Title Describing the Specification's Focus]
31
+
# Introduction
23
32
24
-
**Version:**[Optional: e.g., 1.0, Date]
25
-
**Last Updated:**[Optional: YYYY-MM-DD]
26
-
**Owner:**[Optional: Team/Individual responsible for this spec]
33
+
[A short concise introduction to the specification and the goal it is intended to achieve.]
27
34
28
35
## 1. Purpose & Scope
29
36
@@ -37,10 +44,12 @@ The specification must follow the template below, ensuring that all sections are
37
44
38
45
[Explicitly list all requirements, constraints, rules, and guidelines. Use bullet points or tables for clarity.]
39
46
40
-
* Requirement 1: ...
41
-
* Constraint 1: ...
42
-
* Guideline 1: ...
43
-
* Pattern to follow: ...
47
+
-**REQ-001**: [Requirement 1]
48
+
-**SEC-001**: [Security Requirement 1]
49
+
-**[3 LETTERS]-001**: [Other Requirement 1]
50
+
-**CON-001**: [Constraint 1]
51
+
-**GUD-001**: [Guideline 1]
52
+
-**PAT-001**: [Pattern to follow 1]
44
53
45
54
## 4. Interfaces & Data Contracts
46
55
@@ -62,5 +71,5 @@ The specification must follow the template below, ensuring that all sections are
- Changed integration tests to deploy Cosmos DB using Bicep.
95
-
- Update `requirements.psd1` to install modules `Az.Accounts` 2.19.0 and `Az.Resources` 6.16.2.
96
-
- Renamed `New-CosmosDbAuthorizationToken` to `New-CosmosDbAuthorizationHeader` to better indicate
111
+
- Update `requirements.psd1` to install modules `Az.Accounts` 2.19.0 and
112
+
`Az.Resources` 6.16.2.
113
+
- Renamed `New-CosmosDbAuthorizationToken` to `New-CosmosDbAuthorizationHeader`
114
+
to better indicate
97
115
actual function return type.
98
-
- Refactored `Invoke-CosmosDbRequest` to support getting the EntraIdToken property from the context object
99
-
and using it for authentication if it is provided. If the Key property is provided, the EntraIdToken property
116
+
- Refactored `Invoke-CosmosDbRequest` to support getting the EntraIdToken property
117
+
from the context object and using it for authentication if it is provided. If
118
+
the Key property is provided, the EntraIdToken property
100
119
will take precendence and the key will be ignored.
101
120
- Updated CI pipeline to use `PublishCodeCoverageResults@2` task rather than `PublishCodeCoverageResults@1`
102
121
task to support the latest version of the task.
@@ -105,24 +124,28 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
105
124
106
125
- BREAKING CHANGE: Updated module to require `Az.Accounts` v2.19.0 or newer and `Az.Resources`
107
126
v6.16.2 or newer.
108
-
- Renamed `New-CosmosDbAuthorizationHeader` to `Get-CosmosDbAuthorizationHeaderFromContext` to better indicate
109
-
actual function behaviour.
110
-
- Renamed `Get-CosmosDbAuthorizationHeadersFromContext` to `Get-CosmosDbAuthorizationHeaderFromContextResourceToken` to better
111
-
indicate actual function behaviour and align naming convention.
112
-
- Refactored `Invoke-CosmosDbRequest` to clean up logic to generate the authorization header.
113
-
- Added new utillity function `Get-CosmosDbAuthorizationHeaderFromContextEntraId` to generate the authorization
114
-
header when an Entra ID Token is provided in the context. This function is used by `Invoke-CosmosDbRequest` to
115
-
generate the authorization header when an Entra ID Token is provided.
127
+
- Renamed `New-CosmosDbAuthorizationHeader` to `Get-CosmosDbAuthorizationHeaderFromContext`
128
+
to better indicate actual function behaviour.
129
+
- Renamed `Get-CosmosDbAuthorizationHeadersFromContext` to `Get-CosmosDbAuthorizationHeaderFromContextResourceToken`
130
+
to better indicate actual function behaviour and align naming convention.
131
+
- Refactored `Invoke-CosmosDbRequest` to clean up logic to generate the authorization
132
+
header.
133
+
- Added new utillity function `Get-CosmosDbAuthorizationHeaderFromContextEntraId`
134
+
to generate the authorization header when an Entra ID Token is provided in the
135
+
context. This function is used by `Invoke-CosmosDbRequest` to generate the
136
+
authorization header when an Entra ID Token is provided.
116
137
- Changed module import process to load the `Az.Accounts` and `Az.Resources` modules
117
-
only if they haven't already been loaded to support saving the module and storing in
118
-
folders.
138
+
only if they haven't already been loaded to support saving the module and storing
139
+
in folders.
119
140
120
141
### Added
121
142
122
-
- Added support for setting an Entra Id OAuth2 Token in the `New-CosmosDbContext` - Fixes [Issue #479](https://github.com/PlagueHO/CosmosDB/issues/479).
123
-
- Added new `Get-CosmosDbEntraIdToken` function that uses `Get-AzAccessToken` to get an Entra Id Token
124
-
for use in Cosmos DB requests. This is used by `New-CosmosDbContext` to set the Entra Id Token in the
@@ -714,9 +745,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
714
745
715
746
- Fix creation of spatial index by `New-CosmosDbCollectionIncludedPathIndex`
716
747
so that precision is not used when passing to `New-CosmosDbCollection`.
717
-
- Added support for `-PartitionKey` in `Invoke-CosmosDbStoredProcedure` - See [Issue #116](https://github.com/PlagueHO/CosmosDB/issues/116)
718
-
- Changed -StoredProcedureParameter from string[] to object[] in `Invoke-CosmosDbStoredProcedure` - See [Issue #116](https://github.com/PlagueHO/CosmosDB/issues/116)
719
-
- Updated `Invoke-CosmosDbStoredProcedure` to set `x-ms-documentdb-script-enable-logging: true` header and write stored procedure logs to the Verbose Stream when `-Debug` is set - See [Issue #116](https://github.com/PlagueHO/CosmosDB/issues/116)
748
+
- Added support for `-PartitionKey` in `Invoke-CosmosDbStoredProcedure` -
749
+
See [Issue #116](https://github.com/PlagueHO/CosmosDB/issues/116)
750
+
- Changed -StoredProcedureParameter from string[] to object[] in
751
+
`Invoke-CosmosDbStoredProcedure` - See [Issue #116](https://github.com/PlagueHO/CosmosDB/issues/116)
752
+
- Updated `Invoke-CosmosDbStoredProcedure` to set
753
+
`x-ms-documentdb-script-enable-logging: true` header and write stored procedure
754
+
logs to the Verbose Stream when `-Debug` is set - See [Issue #116](https://github.com/PlagueHO/CosmosDB/issues/116)
0 commit comments