Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

NationalClouds are wrongly prefixed #917

Open
Labels
type:bugA broken experience

Description

Describe the bug

NationalClouds is defined in

class NationalClouds(str, Enum):
"""Enumerated list of supported sovereign clouds"""
China = 'https://microsoftgraph.chinacloudapi.cn'
Germany = 'https://graph.microsoft.de'
Global = 'https://graph.microsoft.com'
US_DoD = 'https://dod-graph.microsoft.us'
US_GOV = 'https://graph.microsoft.us'
def __str__(self):
return self.value
where all values are prefixed by https,

however, since we pass them as allowed hosts to the AzureIdentityAuthenticationProvider by default in

allowed_hosts: list[str] = [nc.value for nc in NationalClouds]

they are fed to the AllowedHostsValidator which in https://github.com/microsoft/kiota-python/blob/b23edcbf268efdb81d14ef59cecc6c9565288248/packages/abstractions/kiota_abstractions/authentication/allowed_hosts_validator.py#L20 raises an exception if they are prefixed.

Expected behavior

The validator should either strip the urls or the enum should be updated.

How to reproduce

Instantiate an AzureIdentityAuthenticationProvider with default allowed hosts.

SDK Version

1.3.3

Latest version known to work for scenario above?

No response

Known Workarounds

Pass allowed_hosts manually.

Debug output

No response

Configuration

No response

Other information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    type:bugA broken experience

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

        AltStyle によって変換されたページ (->オリジナル) /