PowerShell / PowerShell/PSResourceGet

TLS not working on custom PSResourceRepository

Open
#314 2 comments 3 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Area-PSRepository Issue-Bug Status-Investigating
Dominant language
C#
Stars
576
Forks
114
Avg merge
1d 2h
Merged PRs (30d)
7

Description

Hello,

I am not able to communicate using TLS with my custom local PSResourceRepository. I am able to define it using a TLS URI. For instance :
Register-PSResourceRepository -Name Myrepo -Url 'https://myreposerver.tld/v3/index.json' -Trusted

But each time I am trying to use for instance 'Find-PSResource', the function is trying to communicate using HTTP only instead of HTTPS
Find-PSResource -Tags AzureADConnect -Repository Myrepo -Verbose
AVERTISSEMENT : This functionality is not yet implemented
Find-PSResource : Failed to retrieve metadata from source
'http://myreposerver.tld:443/v3/search?q=&skip=0&take=6000&prerelease=false&semVerLevel=2.0.0'.

I have done a network capture and there is no TLS nego between client and server, it's like TLS is not implemented on the client side at all. But it works for default PSGallery...

Any idea ?

Lucas.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the failure with Register-PSResourceRepository and Find-PSResource using the custom HTTPS repository, then compare it with the working PSGallery behavior. Trace how the repository URL becomes the metadata request URL; done means the custom repository request preserves HTTPS and Find-PSResource retrieves metadata successfully.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp, powershell
Domain
cli, networking, security
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.