8000 Cherry-Pick Skill Validation to 4.9 (#1375) (#1377) · microsoft/botbuilder-python@414f6a4 · GitHub
[go: up one dir, main page]

Skip to content

Commit 414f6a4

Browse files
authored
Cherry-Pick Skill Validation to 4.9 (#1375) (#1377)
* Throw if is_skill_claim and claims_validator is null (#1375) * Throw if is_skill_claim and claims_validator is null * Update jwt_token_validation.py * pin black version
1 parent a06e301 commit 414f6a4

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

libraries/botframework-connector/botframework/connector/auth/jwt_token_validation.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,9 @@ async def validate_claims(
165165
):
166166
if auth_config and auth_config.claims_validator:
167167
await auth_config.claims_validator(claims)
168+
elif SkillValidation.is_skill_claim(claims):
169+
# Skill claims must be validated using AuthenticationConfiguration claims_validator
170+
raise PermissionError("Unauthorized Access. Request is not authorized. Skill Claims require validation.")
168171

169172
@staticmethod
170173
def is_government(channel_service: str) -> bool:

pipelines/botbuilder-python-ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ jobs:
6060
pip install -r ./libraries/botbuilder-ai/tests/requirements.txt
6161
pip install coveralls
6262
pip install pylint==2.4.4
63-
pip install black
63+
pip install black==19.10b0
6464
displayName: 'Install dependencies'
6565
6666
- script: |

0 commit comments

Comments
 (0)
0