-
Notifications
You must be signed in to change notification settings - Fork 80
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Resource Docs cleanup - For Clinton's Review #663
Open
dkumaras
wants to merge
1
commit into
main
Choose a base branch
from
DK/resources_cleanup_pilot
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -35,7 +35,7 @@ end | |||||
The following parameters can be passed for targeting specific domains. | ||||||
|
||||||
`filter` | ||||||
: A hash containing the filtering options and their values. The `starts_with_` operator can be used for fuzzy string matching. Parameter names are in snake case. | ||||||
: A hash containing the filtering options and their values. The `starts_with_` operator can be used for fuzzy string matching. Parameter names are in the snake case. | ||||||
|
||||||
: **Example**: `{ starts_with_given_name: 'J', starts_with_department: 'Core', country: 'United Kingdom', given_name: John}` | ||||||
|
||||||
|
@@ -44,7 +44,7 @@ The following parameters can be passed for targeting specific domains. | |||||
|
||||||
: **Example**: `"startswith(displayName,'J') and surname eq 'Doe'"` or `"userType eq 'Guest'"` | ||||||
|
||||||
It is advised to use these parameters to narrow down the targeted resources at the server side, Azure Graph API, for a more efficient test. | ||||||
It is advised to use these parameters to narrow down the targeted resources at the server-side, Azure Graph API, for a more efficient test. | ||||||
|
||||||
## Properties | ||||||
|
||||||
|
@@ -64,7 +64,7 @@ It is advised to use these parameters to narrow down the targeted resources at t | |||||
: **Field**: `availabilityStatus` | ||||||
|
||||||
`is_admin_manageds` | ||||||
: A list of admin managed configuration. | ||||||
: A list of admin-managed configuration. | ||||||
|
||||||
: **Field**: `isAdminManaged` | ||||||
|
||||||
|
@@ -114,23 +114,23 @@ It is advised to use these parameters to narrow down the targeted resources at t | |||||
|
||||||
The following examples show how to use this InSpec audit resource. | ||||||
|
||||||
**Check domains with some filtering parameters applied at server side using `filter`.** | ||||||
### Test to ensure domains with some filtering parameters are applied at server side using `filter` | ||||||
|
||||||
```ruby | ||||||
describe azure_active_directory_domain_services(filter: {authenticationType: "authenticationType-value"}) do | ||||||
it { should exist } | ||||||
end | ||||||
``` | ||||||
|
||||||
**Check domains with some filtering parameters applied at server side using `filter_free_text`.** | ||||||
### Test to ensure domains with some filtering parameters are applied at the server side using `filter_free_text` | ||||||
|
||||||
```ruby | ||||||
describe azure_active_directory_domain_services(filter_free_text: "startswith(authenticationType,'authenticationType-value')") do | ||||||
it { should exist } | ||||||
end | ||||||
``` | ||||||
|
||||||
**Ensure there are supported services using client-side filtering.** | ||||||
### Test to ensure there are supported services using client-side filtering | ||||||
|
||||||
```ruby | ||||||
describe azure_active_directory_domain_services.supportedServices do | ||||||
|
@@ -142,9 +142,9 @@ end | |||||
|
||||||
{{% inspec_matchers_link %}} | ||||||
|
||||||
### exists | ||||||
### Exists | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
|
||||||
The control will pass if the filter returns at least one result. Use `should_not` if you expect zero matches. | ||||||
The control passes if the filter returns at least one result. Use `should_not` if you expect zero matches. | ||||||
|
||||||
```ruby | ||||||
describe azure_active_directory_domain_services do | ||||||
|
@@ -154,5 +154,4 @@ end | |||||
|
||||||
## Azure Permissions | ||||||
|
||||||
Graph resources require specific privileges granted to your service principal. | ||||||
Please refer to the [Microsoft Documentation](https://docs.microsoft.com/en-us/azure/active-directory/develop/active-directory-integrating-applications#updating-an-application) for information on how to grant these permissions to your application. | ||||||
Graph resources require specific privileges granted to your service principal. Please refer to the [Microsoft Documentation](https://docs.microsoft.com/en-us/azure/active-directory/develop/active-directory-integrating-applications#updating-an-application) for information on how to grant these permissions to your application. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -22,7 +22,7 @@ Use the `azure_aks_clusters` InSpec audit resource to test properties and config | |||||
|
||||||
## Syntax | ||||||
|
||||||
An `azure_aks_clusters` resource block returns all AKS Clusters, either within a Resource Group (if provided), or within an entire Subscription. | ||||||
An `azure_aks_clusters` resource block returns all AKS Clusters, either within a resource group (if provided) or an entire subscription. | ||||||
|
||||||
```ruby | ||||||
describe azure_aks_clusters do | ||||||
|
@@ -33,7 +33,7 @@ end | |||||
or | ||||||
|
||||||
```ruby | ||||||
describe azure_aks_clusters(resource_group: 'my-rg') do | ||||||
describe azure_aks_clusters(resource_group: 'RESOURCE_GROUP') do | ||||||
#... | ||||||
end | ||||||
``` | ||||||
|
@@ -47,7 +47,7 @@ end | |||||
## Properties | ||||||
|
||||||
`ids` | ||||||
: A list of the unique resource ids. | ||||||
: A list of the unique resource IDs. | ||||||
|
||||||
: **Field**: `id` | ||||||
|
||||||
|
@@ -78,27 +78,31 @@ end | |||||
**Test that an Example Resource Group has the Named AKS Cluster.** | ||||||
|
||||||
```ruby | ||||||
describe azure_aks_clusters(resource_group: 'ExampleGroup') do | ||||||
its('names') { should include('ClusterName') } | ||||||
describe azure_aks_clusters(resource_group: 'RESOURCE_GROUP') do | ||||||
its('names') { should include('CLUSTER_NAME') } | ||||||
end | ||||||
``` | ||||||
|
||||||
## Matchers | ||||||
|
||||||
{{% inspec_matchers_link %}} | ||||||
|
||||||
### exists | ||||||
### Exists | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
|
||||||
The control will pass if the filter returns at least one result. Use `should_not` if you expect zero matches. | ||||||
The control passes if the filter returns at least one result. Use `should_not` if you expect zero matches. | ||||||
|
||||||
```ruby | ||||||
# If we expect 'ExampleGroup' Resource Group to have AKS Clusters | ||||||
describe azure_aks_clusters(resource_group: 'ExampleGroup') do | ||||||
describe azure_aks_clusters(resource_group: 'RESOURCE_GROUP') do | ||||||
it { should exist } | ||||||
end | ||||||
``` | ||||||
|
||||||
### Not Exists | ||||||
|
||||||
```ruby | ||||||
# If we expect 'EmptyExampleGroup' Resource Group to not have AKS Clusters | ||||||
describe azure_aks_clusters(resource_group: 'EmptyExampleGroup') do | ||||||
describe azure_aks_clusters(resource_group: 'EMPTY_RESOURCE_GROUP') do | ||||||
it { should_not exist } | ||||||
end | ||||||
``` | ||||||
|
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.