File tree Expand file tree Collapse file tree 3 files changed +5
-5
lines changed
libparsec/crates/openbao/src Expand file tree Collapse file tree 3 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -88,7 +88,7 @@ impl OpenBaoCmds {
8888 }
8989
9090 /// This signing system relies on the fact OpenBao is configured to only
91- /// allow POST `/transit/sign/user -{entity_id}` (i.e. the signing API) to
91+ /// allow POST `/transit/sign/entity -{entity_id}` (i.e. the signing API) to
9292 /// the user referenced in OpenBao by this entity ID.
9393 ///
9494 /// This way the verify operation knows the entity ID of the author, and can
Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ enum SignOutcome {
1313}
1414
1515fn generate_sign_key_name ( openbao_entity_id : & str ) -> String {
16- format ! ( "user -{}" , openbao_entity_id)
16+ format ! ( "entity -{}" , openbao_entity_id)
1717}
1818
1919pub async fn sign ( cmds : & OpenBaoCmds , payload : & [ u8 ] ) -> Result < String , OpenBaoSignError > {
Original file line number Diff line number Diff line change @@ -530,7 +530,7 @@ async def test_openbao_create_key(request: Request, key_name: str):
530530 if not entity_id :
531531 return Response (status_code = 403 )
532532
533- if key_name != f"user -{ entity_id } " :
533+ if key_name != f"entity -{ entity_id } " :
534534 return Response (status_code = 403 )
535535
536536 # See https://openbao.org/api-docs/secret/transit/#create-key
@@ -592,7 +592,7 @@ async def test_openbao_sign(request: Request, key_name: str):
592592 if not entity_id :
593593 return Response (status_code = 403 )
594594
595- if key_name != f"user -{ entity_id } " :
595+ if key_name != f"entity -{ entity_id } " :
596596 return Response (status_code = 403 )
597597
598598 # See https://openbao.org/api-docs/secret/transit/#sign-data
@@ -640,7 +640,7 @@ async def test_openbao_verify(request: Request, key_name: str):
640640 if not entity_id :
641641 return Response (status_code = 403 )
642642
643- author_entity_id = key_name .removeprefix ("user -" )
643+ author_entity_id = key_name .removeprefix ("entity -" )
644644
645645 # See https://openbao.org/api-docs/secret/transit/#verify-signed-data
646646
You can’t perform that action at this time.
0 commit comments