Skip to content

Commit

Permalink
feat(rust): remove deprecated PROJECT_ID from credentials check
Browse files Browse the repository at this point in the history
  • Loading branch information
SanjoDeundiak committed Aug 18, 2023
1 parent 6d19dbb commit 1679348
Showing 1 changed file with 4 additions and 12 deletions.
16 changes: 4 additions & 12 deletions implementations/rust/ockam/ockam_api/src/nodes/service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -211,18 +211,10 @@ impl NodeManager {
if self.policies.get_policy(r, a).await?.is_none() {
let fallback = match custom_default {
Some(e) => e.clone(),
None => and([
eq([ident("resource.project_id"), ident("subject.project_id")]), // TODO: DEPRECATE - Removing PROJECT_ID attribute in favor of TRUST_CONTEXT_ID
/*
* TODO: replace the project_id check for trust_context_id. For now the
* existing authority deployed doesn't know about trust_context so this is to
* be done after updating deployed authorities.
eq([
ident("resource.trust_context_id"),
ident("subject.trust_context_id"),
]),
*/
]),
None => and([eq([
ident("resource.trust_context_id"),
ident("subject.trust_context_id"),
])]),
};
self.policies.set_policy(r, a, &fallback).await?
}
Expand Down

0 comments on commit 1679348

Please sign in to comment.