Skip to content

Commit 3b8f73a

Browse files
SUMO-168729: Add entity id as part of saml resource (#236)
* SUMO-168729: Add entity id as part of saml response * SUMO-168729: formatting * SUMO-168729: Modifying text related to entity id * SUMO-168729: Modifying changelog to include entity id info as part of terraform release
1 parent 54ccf32 commit 3b8f73a

File tree

5 files changed

+15
-0
lines changed

5 files changed

+15
-0
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@ BUG FIXES:
66
* seperated docs for sumologic_monitor_folder from docs for sumologic_monitor.
77
* resource/sumologic_monitor: Fixed docs for `trigger_conditions`.
88

9+
FEATURES:
10+
11+
* Adding "entityId" as part of SAML API response object.
12+
913
## 2.9.8 (July 30, 2021)
1014

1115
FEATURES:

sumologic/resource_sumologic_saml_configuration.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,10 @@ func resourceSumologicSamlConfiguration() *schema.Resource {
110110
Type: schema.TypeString,
111111
Computed: true,
112112
},
113+
"entity_id": {
114+
Type: schema.TypeString,
115+
Computed: true,
116+
},
113117
},
114118
}
115119
}
@@ -211,6 +215,7 @@ func setSamlConfiguration(d *schema.ResourceData, samlConfiguration *SamlConfigu
211215
d.Set("disable_requested_authn_context", samlConfiguration.DisableRequestedAuthnContext)
212216
d.Set("is_redirect_binding", samlConfiguration.IsRedirectBinding)
213217
d.Set("assertion_consumer_url", samlConfiguration.AssertionConsumerUrl)
218+
d.Set("entity_id", samlConfiguration.EntityId)
214219

215220
d.Set("certificate", samlConfiguration.Certificate)
216221
}

sumologic/resource_sumologic_saml_configuration_test.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -216,6 +216,10 @@ func testAccCheckSamlConfigurationExists(name string) resource.TestCheckFunc {
216216
if strings.EqualFold(assertion_consumer_url, "") {
217217
return fmt.Errorf("Assertion Consumer URL not found for Saml Configuration (id=%s)", id)
218218
}
219+
entity_id := rs.Primary.Attributes["entity_id"]
220+
if strings.EqualFold(entity_id, "") {
221+
return fmt.Errorf("Entity Id not set for Saml Configuration (id=%s)", id)
222+
}
219223
return nil
220224
}
221225
}

sumologic/sumologic_saml_configuration.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,4 +87,5 @@ type SamlConfiguration struct {
8787
Certificate string `json:"certificate,omitempty"`
8888
ID string `json:"id,omitempty"`
8989
AssertionConsumerUrl string `json:"assertionConsumerUrl,omitempty"`
90+
EntityId string `json:"entityId,omitempty"`
9091
}

website/docs/r/saml_configuration.html.markdown

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ The following attributes are exported:
6969
- `id` - Unique identifier for the SAML Configuration.
7070
- `certificate` - Authentication Request Signing Certificate for the user.
7171
- `assertion_consumer_url` - The URL on Sumo Logic where the IdP will redirect to with its authentication response.
72+
- `entity_id` - A unique identifier that is the intended audience of the SAML assertion.
7273

7374
## Import
7475
SAML Configuration can be imported using the SAML configuration id, e.g.:

0 commit comments

Comments
 (0)