Przeglądasz dokumentację Apigee Edge.
Przejdź do
Dokumentacja Apigee X. informacje.
UserNameRequired
Komunikat o błędzie
Wdrożenie serwera proxy interfejsu API za pomocą interfejsu Edge UI lub Edge Management API nie powiedzie się i wyświetli się ten komunikat o błędzie:
Error Deploying Revision revision_number to env_name BasicAuthenticationPolicy: Username element must be present for operation operation.
Przykładowy komunikat o błędzie
Error Deploying Revision 2 to test
BasicAuthenticationPolicy: Username element must be present for Encode operation.
Przykładowy zrzut ekranu

Przyczyna
Wdrożenie serwera proxy interfejsu API się nie uda, jeśli element <User> nie jest zdefiniowany w zasadzie uwierzytelniania Basic. Element <User> jest wymagany zarówno przy kodowaniu, jak i dekodowaniu.
Diagnostyka
Sprawdź wszystkie zasady uwierzytelniania podstawowego używane na serwerze proxy interfejsu API. Jeśli element
<User>nie jest określony, to jest przyczyną błędu. Element<User>jest wymagany w zasadach uwierzytelniania podstawowego podczas kodowania i dekodowania.Przykładowa zasada uwierzytelniania podstawowego widoczna poniżej jest używana w operacji kodowania, ale nie ma zdefiniowanego elementu
<User>:<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <BasicAuthentication name="ApplyBasicAuthHeader"> <DisplayName>ApplyBasicAuthHeader</DisplayName> <Operation>Encode</Operation> <IgnoreUnresolvedVariables>false</IgnoreUnresolvedVariables> <Password ref="BasicAuth.credentials.password"/> <AssignTo createNew="false">request.header.Authorization</AssignTo> </BasicAuthentication>Wdrożenie kończy się niepowodzeniem i wyświetlany jest ten błąd:
BasicAuthenticationPolicy: Username element must be present for Encode operation.
Rozdzielczość
Upewnij się, że element <User> jest zdefiniowany w zasadzie BasicAuthentication operacji kodowania lub dekodowania.
Aby poprawić przykład powyżej, uwzględnij w zasadzie element <User> w ten sposób:
<?xml version="1.0" encoding="UTF-8&quo>t<; standalone="yes"?
BasicAuthenticati>on na<me="Ap>plyBasicAuthHeader&q<uot;
Dis>playN<ameApplyB>asicAu<thHeader/D>ispla<yName
OperationEncode>/Oper<ation
IgnoreUnresolved>Varia<blesfalse/IgnoreUnresolvedVariables
Us>er re<f="BasicAuth.credentials.username"/
> P<assword ref="BasicAut>h.credentials.password"</
Ass>i<gnTo createNew=">;false"request.header.Authorization/AssignTo
/BasicAuthentication
PasswordRequired
Komunikat o błędzie
Wdrożenie serwera proxy interfejsu API za pomocą interfejsu Edge UI lub Edge Management API nie powiedzie się i wyświetli się ten komunikat o błędzie:
Error Deploying Revision revision_number to env_name BasicAuthenticationPolicy: Password element must be present for operation operation.
Przykładowy komunikat o błędzie
Error Deploying Revision 2 to test
BasicAuthenticationPolicy: Password element must be present for Encode operation.
Przykładowy zrzut ekranu

Przyczyna
Wdrożenie serwera proxy interfejsu API się nie uda, jeśli element <Password> nie jest zdefiniowany w zasadzie uwierzytelniania Basic. Element <Password> jest wymagany zarówno przy kodowaniu, jak i dekodowaniu.
Diagnostyka
Sprawdź wszystkie zasady uwierzytelniania podstawowego używane na serwerze proxy interfejsu API. Jeśli występuje zasada, w której element
<Password>nie jest zdefiniowany, to to jest przyczyną błędu. Element<Password>jest wymagany w zasadach uwierzytelniania podstawowego przy kodowaniu lub dekodowaniu.Przykładowa zasada uwierzytelniania podstawowego widoczna poniżej jest używana w operacji kodowania, ale nie ma zdefiniowanego elementu
<Password>:<?xml version="1.0" encoding="UTF-8&quo>t<; standalone="yes"? BasicAuthenticati>on <name=">ApplyBasicAuthHeader<" Dis>pla<yNameAppl>yBasic<AuthHeader>/Di<splayName OperationEnco>de/Op<eration IgnoreUnresolved>Var<iablesfalse/IgnoreUnresolvedVariables Us>er <ref="BasicAuth.creden>tials.username"/ Assi<gnTo crea>t<eNew="false&quo>t;request.header.Authorization/AssignTo /BasicAuthenticationWdrożenie kończy się niepowodzeniem i wyświetlany jest ten błąd:
BasicAuthenticationPolicy: Password element must be present for Encode operation.
Rozdzielczość
Upewnij się, że element <Password> jest zdefiniowany w zasadzie BasicAuthentication operacji kodowania lub dekodowania.
Aby poprawić przykład powyżej, uwzględnij w zasadzie element <Password> w ten sposób:
<?xml version="1.0" encoding="UTF-8&quo>t<; standalone="yes"?
BasicAuthenticati>on na<me="Ap>plyBasicAuthHeader&q<uot;
Dis>playN<ameApplyB>asicAu<thHeader/D>ispla<yName
OperationEncode>/Oper<ation
IgnoreUnresolved>Varia<blesfalse/IgnoreUnresolvedVariables
Us>er re<f="BasicAuth.credentials.username"/
> P<assword ref="BasicAut>h.credentials.password"</
Ass>i<gnTo createNew=">;false"request.header.Authorization/AssignTo
/BasicAuthentication
AssignToRequired
Komunikat o błędzie
Wdrożenie serwera proxy interfejsu API za pomocą interfejsu Edge UI lub Edge Management API nie powiedzie się i wyświetli się ten komunikat o błędzie:
Error Deploying Revision revision_number to env_name BasicAuthenticationPolicy: AssignTo element must be present for operation operation.
Przykładowy komunikat o błędzie
Error Deploying Revision 2 to test
BasicAuthenticationPolicy: AssignTo element must be present for Encode operation.
Przykładowy zrzut ekranu

Przyczyna
Wdrożenie serwera proxy interfejsu API się nie uda, jeśli element <AssignTo> nie jest zdefiniowany w zasadzie uwierzytelniania Basic. Element <AssignTo> jest wymagany zarówno przy kodowaniu, jak i dekodowaniu.
Diagnostyka
Sprawdź wszystkie zasady uwierzytelniania podstawowego używane na serwerze proxy interfejsu API. Jeśli występuje zasada, w której element
<AssignTo>nie jest zdefiniowany, to to jest przyczyną błędu. Element<AssignTo>musi być zdefiniowany w zasadzie BasicAuthentication w przypadku operacji kodowania i dekodowania.Przykładowa zasada uwierzytelniania podstawowego widoczna poniżej jest używana w operacji kodowania, ale nie ma zdefiniowanego elementu
<AssignTo>:<?xml version="1.0" encoding="UTF-8&quo>t<; standalone="yes"? BasicAuthenticati>on <name=">ApplyBasicAuthHeader<" Dis>pla<yNameAppl>yBasic<AuthHeader>/Di<splayName OperationEnco>de/Op<eration IgnoreUnresolved>Var<iablesfalse/IgnoreUnresolvedVariables Us>er <ref="BasicAuth.credentials.username">/< Password ref=&quo>t;BasicAuth.credentials.password"/ /BasicAuthenticationWdrożenie kończy się niepowodzeniem i wyświetlany jest ten błąd:
BasicAuthenticationPolicy: AssignTo element must be present for Encode operation.
Rozdzielczość
Upewnij się, że element <AssignTo> jest zdefiniowany w zasadzie BasicAuthentication operacji kodowania lub dekodowania.
Aby poprawić przykład powyżej, uwzględnij w zasadzie element <AssignTo> w ten sposób:
<?xml version="1.0" encoding="UTF-8&quo>t<; standalone="yes"?
BasicAuthenticati>on na<me="Ap>plyBasicAuthHeader&q<uot;
Dis>playN<ameApplyB>asicAu<thHeader/D>ispla<yName
OperationEncode>/Oper<ation
IgnoreUnresolved>Varia<blesfalse/IgnoreUnresolvedVariables
Us>er re<f="BasicAuth.credentials.username"/
> P<assword ref="BasicAut>h.credentials.password"</
Ass>i<gnTo createNew=">;false"request.header.Authorization/AssignTo
/BasicAuthentication
SourceRequired
Komunikat o błędzie
Wdrożenie serwera proxy interfejsu API za pomocą interfejsu Edge UI lub Edge Management API nie powiedzie się i wyświetli się ten komunikat o błędzie:
Error Deploying Revision revision_number to env_name BasicAuthenticationPolicy: Source element must be present for Decode operation.
Przykładowy komunikat o błędzie
Error Deploying Revision 2 to test
BasicAuthenticationPolicy: Source element must be present for Decode operation.
Przykładowy zrzut ekranu

Przyczyna
Wdrożenie serwera proxy interfejsu API się nie uda, jeśli element <Source> nie jest zdefiniowany w zasadzie BasicAuthentication używanej do operacji dekodowania. Element <Source> jest wymagany, jeśli w zasadzie uwierzytelniania podstawowego <Operation> określono jako Decode.
Diagnostyka
Sprawdź wszystkie zasady uwierzytelniania podstawowego używane na serwerze proxy interfejsu API. Jeśli istnieje zasada, w której element
<Source>nie jest zdefiniowany, a element<Operation>jest zdefiniowany jakoDecode, to właśnie jest przyczyną błędu. Element<Source>jest wymagany, jeśli w zasadzie uwierzytelniania podstawowego<Operation>określono jakoDecode.Przykładowa zasada uwierzytelniania podstawowego widoczna poniżej jest używana w operacji
Decode, ale nie ma zdefiniowanego elementu<Source>:<?xml version="1.0" encoding="UTF-8&quo>t<; standalone="yes"? BasicAuthenticati>on <name=">ApplyBasicAuthHeader<" Dis>pla<yNameAppl>yBasic<AuthHeader>/Di<splayName OperationDeco>de/Op<eration IgnoreUnresolved>Var<iablesfalse/IgnoreUnresolvedVariables Us>er <ref="BasicAuth.credentials.username">/ < Password ref="BasicA>uth.credentials.password&quo<t;/ Ass>i<gnTo createNew=">;false"request.header.Authorization/AssignTo /BasicAuthenticationWdrożenie kończy się niepowodzeniem i wyświetlany jest ten błąd:
BasicAuthenticationPolicy: Source element must be present for Decode operation.
Rozdzielczość
Sprawdź, czy element <Source> jest zdefiniowany w zasadzie uwierzytelniania Basic, gdy jest używany w operacji Decode.
Aby poprawić przykład powyżej, uwzględnij w zasadzie element <Source> w ten sposób:
<?xml version="1.0" encoding="UTF-8&quo>t<; standalone="yes"?
BasicAuthenticati>on na<me="Ap>plyBasicAuthHeader&q<uot;
Dis>playN<ameApplyB>asicAu<thHeader/D>ispla<yName
OperationDecode>/Oper<ation
IgnoreUnresolved>Varia<blesfalse/IgnoreUnresolvedVariables
Us>er re<f="BasicAuth.credentials.username"/
> P<assword ref="BasicAut>h.credentials.password"</
Ass>ignTo< creat>eNew="false"reques<t.heade>r<.Authorization/Assig>nTo
Sourcerequest.header.Authorization/Source
/BasicAuthentication