diff --git a/src/Services/Authorization/Implementation/PolicyRetrievalPoint.cs b/src/Services/Authorization/Implementation/PolicyRetrievalPoint.cs index 8ed94516..1039afbb 100644 --- a/src/Services/Authorization/Implementation/PolicyRetrievalPoint.cs +++ b/src/Services/Authorization/Implementation/PolicyRetrievalPoint.cs @@ -37,6 +37,7 @@ public async Task GetPolicyAsync(XacmlContextRequest request) var app = request.GetResourceAttributes().Attributes.Where(a => a.AttributeId.ToString() == XacmlRequestAttribute.AppAttribute).Select(a => a.AttributeValues.FirstOrDefault()).FirstOrDefault().Value; var org = request.GetResourceAttributes().Attributes.Where(a => a.AttributeId.ToString() == XacmlRequestAttribute.OrgAttribute).Select(a => a.AttributeValues.FirstOrDefault()).FirstOrDefault().Value; string policyString = await _localApp.GetXACMLPolicy($"{org}/{app}"); + policyString = policyString.Replace("[ORG]", org).Replace("[APP]", app); return ParsePolicyContent(policyString); } @@ -45,7 +46,7 @@ public Task GetPolicyAsync(string org, string app) { throw new NotImplementedException(); } - + public static XacmlPolicy ParsePolicyContent(string policyContent) { XacmlPolicy policy;