Skip to content
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

[Confidential Ledger] Example fixes and Swagger changes to accommodate CLI / PowerShell generation #17695

Merged
merged 10 commits into from
Feb 18, 2022
Original file line number Diff line number Diff line change
Expand Up @@ -530,7 +530,7 @@
"description": "Cert based security principal with Ledger RoleName",
"properties": {
"cert": {
"description": "Base64 encoded public key of the user cert (.pem or .cer)",
"description": "Public key of the user cert (.pem or .cer)",
"type": "string"
},
"ledgerRoleName": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -412,7 +412,7 @@
}
},
"definitions": {
"Location": {
"ResourceLocation": {
"description": "Location of the ARM Resource",
"type": "object",
"properties": {
Expand Down Expand Up @@ -578,7 +578,7 @@
"description": "Cert based security principal with Ledger RoleName",
"properties": {
"cert": {
"description": "Base64 encoded public key of the user cert (.pem or .cer)",
"description": "Public key of the user cert (.pem or .cer)",
"type": "string"
},
"ledgerRoleName": {
Expand Down Expand Up @@ -661,7 +661,7 @@
"$ref": "#/definitions/Resource"
},
{
"$ref": "#/definitions/Location"
"$ref": "#/definitions/ResourceLocation"
},
{
"$ref": "#/definitions/Tags"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
],
"certBasedSecurityPrincipals": [
{
"cert": "MIIDBTCCAe2gAwIBAgIQXVogj9BAf49IpuOSIvztNDANBgkqhkiG9w0BAQsFADAtMSswKQYDVQQDEyJhY2NvdW50cy5hY2Nlc3Njb250cm9sLndpbmRvd3MubmV0MB4XDTIwMDMxNzAwMDAwMFoXDTI1MDMxNzAwMDAwMFowLTErMCkGA1UEAxMiYWNjb3VudHMuYWNjZXNzY29udHJvbC53aW5kb3dzLm5ldDCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBANfLmdz9yIDskpZzrMXiDeVlCs75ZunrzwzBW5lz7UxdBjH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uhrwgGjDFHeUUT4nGsXaZn69KMB8GA1UdIwQYMBaAFPtuhrwgGjDFHeUUT4nGsXaZn69KMA8GA1UdEwEB/wQFMAMBAf8wCgYIKoZIzj0EAwMDaAAwZQIxAOnozm2CyqRwSSQLls5r+mUHRGRyXHXwYtM4Dcst/VEZdmS9fqvHRCHbjUlO/+HNfgIwMWZ4FmsjD3wnPxONOm9YdVn/PRD7SsPRPbOjwBiE4EBGaHDsLjYAGDSGi7NJnSkA-----END CERTIFICATE-----",
"ledgerRoleName": "Reader"
}
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,22 @@
"resourceGroupName": "DummyResourceGroupName",
"ledgerName": "DummyLedgerName",
"confidentialLedger": {
"properties": {},
"properties": {
"ledgerType": "Public",
"aadBasedSecurityPrincipals": [
{
"principalId": "34621747-6fc8-4771-a2eb-72f31c461f2e",
"tenantId": "bce123b9-2b7b-4975-8360-5ca0b9b1cd08",
"ledgerRoleName": "Administrator"
}
],
"certBasedSecurityPrincipals": [
{
"cert": "-----BEGIN CERTIFICATE-----\nMIIDUjCCAjqgAwIBAgIQJ2IrDBawSkiAbkBYmiAopDANBgkqhkiG9w0BAQsFADAmMSQwIgYDVQQDExtTeW50aGV0aWNzIExlZGdlciBVc2VyIENlcnQwHhcNMjAwOTIzMjIxODQ2WhcNMjEwOTIzMjIyODQ2WjAmMSQwIgYDVQQDExtTeW50aGV0aWNzIExlZGdlciBVc2VyIENlcnQwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCX2s/Eu4q/eQ63N+Ugeg5oAciZua/YCJr41c/696szvSY7Zg1SNJlW88/nbz70+QpO55OmqlEE3QCU+T0Vl/h0Gf//n1PYcoBbTGUnYEmV+fTTHict6rFiEwrGJ62tvcpYgwapInSLyEeUzjki0zhOLJ1OfRnYd1eGnFVMpE5aVjiS8Q5dmTEUyd51EIprGE8RYAW9aeWSwTH7gjHUsRlJnHKcdhaK/v5QKJnNu5bzPFUcpC0ZBcizoMPAtroLAD4B68Jl0z3op18MgZe6lRrVoWuxfqnk5GojuB/Vu8ohAZKoFhQ6NB6r+LL2AUs+Zr7Bt26IkEdR178n9JMEA4gHAgMBAAGjfDB6MA4GA1UdDwEB/wQEAwIFoDAJBgNVHRMEAjAAMB0GA1UdJQQWMBQGCCsGAQUFBwMBBggrBgEFBQcDAjAfBgNVHSMEGDAWgBS/a7PU9iOfOKEyZCp11Oen5VSuuDAdBgNVHQ4EFgQUv2uz1PYjnzihMmQqddTnp+VUrrgwDQYJKoZIhvcNAQELBQADggEBAF5q2fDwnse8egXhfaJCqqM969E9gSacqFmASpoDJPRPEX7gqoO7v1ww7nqRtRDoRiBvo/yNk7jlSAkRN3nRRnZLZZ3MYQdmCr4FGyIqRg4Y94+nja+Du9pDD761rxRktMVPSOaAVM/E5DQvscDlPvlPYe9mkcrLCE4DXYpiMmLT8Tm55LJJq5m07dVDgzAIR1L/hmEcbK0pnLgzciMtMLxGO2udnyyW/UW9WxnjvrrD2JluTHH9mVbb+XQP1oFtlRBfH7aui1ZgWfKvxrdP4zdK9QoWSUvRux3TLsGmHRBjBMtqYDY3y5mB+aNjLelvWpeVb0m2aOSVXynrLwNCAVA=\n-----END CERTIFICATE-----",
"ledgerRoleName": "Reader"
}
]
},
"location": "EastUS",
"tags": {
"additionalProps1": "additional properties",
Expand All @@ -18,8 +33,8 @@
"body": {
"properties": {
"ledgerName": "DummyLedgerName",
"ledgerUri": "https://dummy.accledger.domain.com/DummyLedgerName",
"identityServiceUri": "https://dummy.accledger.identity.com/DummyLedgerName",
"ledgerUri": "https://dummyledgername.confidential-ledger.azure.com",
"identityServiceUri": "https://identity.confidential-ledger.core.azure.com/ledgerIdentity/dummyledgername",
"ledgerType": "Public",
"ledgerInternalNamespace": "dummyNamespace",
"provisioningState": "Succeeded",
Expand All @@ -29,6 +44,12 @@
"tenantId": "bce123b9-2b7b-4975-8360-5ca0b9b1cd08",
"ledgerRoleName": "Administrator"
}
],
"certBasedSecurityPr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mVbb+XQP1oFtlRBfH7aui1ZgWfKvxrdP4zdK9QoWSUvRux3TLsGmHRBjBMtqYDY3y5mB+aNjLelvWpeVb0m2aOSVXynrLwNCAVA=\n-----END CERTIFICATE-----",
"ledgerRoleName": "Reader"
}
]
},
"name": "DummyLedgerName",
Expand Down
12 changes: 12 additions & 0 deletions specification/confidentialledger/resource-manager/readme.az.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
## AZ

These settings apply only when `--az` is specified on the command line.

``` yaml $(az) && $(target-mode) != 'core'
az:
extensions: confidentialledger
namespace: azure.mgmt.confidentialledger
package-name: azure-mgmt-confidentialledger
az-output-folder: $(azure-cli-extension-folder)/src/confidentialledger
python-sdk-output-folder: "$(az-output-folder)/azext_confidentialledger/vendored_sdks/confidentialledger"
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
``` yaml
# add any configuration here for all CLI languages
# refer to the faq.md for more details
```
3 changes: 2 additions & 1 deletion specification/confidentialledger/resource-manager/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,14 +60,15 @@ This is not used by Autorest itself.
```yaml $(swagger-to-sdk)
swagger-to-sdk:
- repo: azure-sdk-for-net
- repo: azure-sdk-for-python
- repo: azure-sdk-for-python-track2
- repo: azure-sdk-for-java
- repo: azure-sdk-for-go
- repo: azure-sdk-for-go-track2
- repo: azure-sdk-for-js
- repo: azure-sdk-for-ruby
after_scripts:
- bundle install && rake arm:regen_all_profiles['azure_mgmt_confidentialledger']
- repo: azure-cli-extensions
```

## Go
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,21 @@
These settings apply only when `--python` is specified on the command line.
Please also specify `--python-sdks-folder=<path to the root directory of your azure-sdk-for-python clone>`.

```yaml $(python)
python:
azure-arm: true
license-header: MICROSOFT_MIT_NO_VERSION
payload-flattening-threshold: 2
namespace: microsoft.confidentialledger
package-name: azure-mgmt-confidentialledger
package-version: 0.0.1
clear-output-folder: true
``` yaml $(track2)
azure-arm: true
license-header: MICROSOFT_MIT_NO_VERSION
package-name: azure-mgmt-confidentialledger
no-namespace-folders: true
package-version: 1.0.0b1
clear-output-folder: true
```

```yaml $(python)
python:
no-namespace-folders: true
output-folder: $(python-sdks-folder)/confidentialledger/azure-mgmt-confidentialledger/azure/mgmt/confidentialledger
``` yaml $(python-mode) == 'update' && $(track2)
no-namespace-folders: true
output-folder: $(python-sdks-folder)/confidentialledger/azure-mgmt-confidentialledger/azure/mgmt/confidentialledger
```

``` yaml $(python-mode) == 'create' && $(track2)
basic-setup-py: true
output-folder: $(python-sdks-folder)/confidentialledger/azure-mgmt-confidentialledger
```