Project

General

Profile

Actions

Bug #6637

closed

Repositories with username/password can't be synced

Added by Anonymous over 9 years ago. Updated over 5 years ago.

Status:
Closed
Priority:
Normal
Category:
Web UI
Target version:
Difficulty:
medium
Triaged:
Yes
Fixed in Releases:
Found in Releases:

Description

I need to sync SLES update repositories, which require basic authentication. For this I'm normally using a URL like e.g. https://username:password@nu.novell.com/repo/$RCE/SLES11-SP2-Updates/sle-11-x86_64/ . When I'm entering that in Katello's repo screen, the URL is not accepted and logs show, it's classified as invalid:

Processing by Katello::Api::V2::RepositoriesController#update as JSON
  Parameters: {"id"=>"1", "name"=>"SLES 11SP2 Updates", "label"=>"SLES_11SP2_Updates", "organization"=>{"name"=>"Default_Organization", "label"=>"Default_Organization"}, "created_at"=>"2014-07-16T09:08:31Z", "updated_at"=>"2014-07-16T09:09:34Z", "sync_state"=>"finished", "last_sync"=>"2014-07-16T11:32:28+02:00", "last_sync_words"=>"25 minutes", "content_type"=>"yum", "unprotected"=>true, "full_path"=>"http://foretello.qa.xxx/pulp/repos/Default_Organization/Library/custom/SLES_11SP2/SLES_11SP2_Updates", "url"=>"https://yyy:xxx@nu.novell.com/repo/$RCE/SLES11-SP2-Updates/sle-11-x86_64/", "relative_path"=>"Default_Organization/Library/custom/SLES_11SP2/SLES_11SP2_Updates", "major"=>nil, "minor"=>nil, "gpg_key_id"=>nil, "content_id"=>"1405501712233", "content_view_version_id"=>1, "library_instance_id"=>nil, "product_type"=>"custom", "content_counts"=>{"srpm"=>818, "rpm"=>2461, "yum_repo_metadata_file"=>3, "erratum"=>345}, "permissions"=>{"deletable"=>true}, ""=>nil, "product"=>{"id"=>1, "cp_id"=>"1405501678150", "name"=>"SLES 11SP2", "sync_plan"=>nil}, "environment"=>{"id"=>1}, "organization_id"=>"1", "api_version"=>"v2", "repository"=>{"id"=>"1", "name"=>"SLES 11SP2 Updates", "created_at"=>"2014-07-16T09:08:31Z", "updated_at"=>"2014-07-16T09:09:34Z", "major"=>nil, "minor"=>nil, "gpg_key_id"=>nil, "library_instance_id"=>nil, "content_id"=>"1405501712233", "label"=>"SLES_11SP2_Updates", "content_view_version_id"=>1, "relative_path"=>"Default_Organization/Library/custom/SLES_11SP2/SLES_11SP2_Updates", "unprotected"=>true, "content_type"=>"yum", "url"=>"https://UC2697531:f29562d6ae@nu.novell.com/repo/$RCE/SLES11-SP2-Updates/sle-11-x86_64/"}}
  User Load (0.4ms)  SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1  [["id", 3]]
Setting current user thread-local variable to Admin User
Setting locale: en
  Katello::Repository Load (0.3ms)  SELECT "katello_repositories".* FROM "katello_repositories" WHERE "katello_repositories"."id" = $1 ORDER BY katello_repositories.name ASC LIMIT 1  [["id", "1"]]
  Katello::KTEnvironment Load (0.3ms)  SELECT "katello_environments".* FROM "katello_environments" WHERE "katello_environments"."id" = 1 LIMIT 1
  Organization Load (0.4ms)  SELECT "taxonomies".* FROM "taxonomies" WHERE "taxonomies"."type" IN ('Organization') AND "taxonomies"."id" = 1 ORDER BY title LIMIT 1
  Katello::Product Load (0.3ms)  SELECT "katello_products".* FROM "katello_products" WHERE "katello_products"."id" = 1 LIMIT 1
  Katello::Provider Load (0.3ms)  SELECT "katello_providers".* FROM "katello_providers" WHERE "katello_providers"."id" = 1 LIMIT 1
   (0.1ms)  BEGIN
  Katello::Repository Exists (0.3ms)  SELECT 1 AS one FROM "katello_repositories" WHERE ("katello_repositories"."pulp_id" = 'Default_Organization-SLES_11SP2-SLES_11SP2_Updates' AND "katello_repositories"."id" != 1) LIMIT 1
  Katello::ContentViewVersion Load (0.2ms)  SELECT "katello_content_view_versions".* FROM "katello_content_view_versions" WHERE "katello_content_view_versions"."id" = 1 LIMIT 1
  Katello::ContentView Load (0.3ms)  SELECT "katello_content_views".* FROM "katello_content_views" WHERE "katello_content_views"."id" = 1 LIMIT 1
  Katello::ContentViewVersion Load (0.5ms)  SELECT "katello_content_view_versions".* FROM "katello_content_view_versions" INNER JOIN "katello_content_view_environments" ON "katello_content_view_environments"."content_view_version_id" = "katello_content_view_versions"."id" WHERE "katello_content_view_versions"."content_view_id" = 1 AND "katello_content_view_environments"."environment_id" = 1 ORDER BY katello_content_view_environments.environment_id DESC, katello_content_view_versions.id DESC LIMIT 1
  Katello::Repository Load (0.4ms)  SELECT "katello_repositories".* FROM "katello_repositories" WHERE "katello_repositories"."content_view_version_id" = 1 AND "katello_repositories"."environment_id" = 1 ORDER BY katello_repositories.name ASC
  CACHE (0.0ms)  SELECT "katello_products".* FROM "katello_products" WHERE "katello_products"."id" = 1 LIMIT 1
  CACHE (0.0ms)  SELECT "katello_content_view_versions".* FROM "katello_content_view_versions" INNER JOIN "katello_content_view_environments" ON "katello_content_view_environments"."content_view_version_id" = "katello_content_view_versions"."id" WHERE "katello_content_view_versions"."content_view_id" = 1 AND "katello_content_view_environments"."environment_id" = 1 ORDER BY katello_content_view_environments.environment_id DESC, katello_content_view_versions.id DESC LIMIT 1
  CACHE (0.0ms)  SELECT "katello_repositories".* FROM "katello_repositories" WHERE "katello_repositories"."content_view_version_id" = 1 AND "katello_repositories"."environment_id" = 1 ORDER BY katello_repositories.name ASC
  CACHE (0.0ms)  SELECT "katello_products".* FROM "katello_products" WHERE "katello_products"."id" = 1 LIMIT 1
   (0.2ms)  ROLLBACK
ActiveRecord::RecordInvalid
url: ["is invalid"]
Completed 422 Unprocessable Entity in 197.8ms (Views: 0.4ms | ActiveRecord: 3.9ms)
With body: {"displayMessage":"Validation failed: Url is invalid","errors":{"url":["is invalid"]}}

A look into app/helpers/katello/katello_url_helper.rb tells that URLs are getting taken apart, but username and password are not part of the logic implemented there.

Actions #1

Updated by The Foreman Bot over 9 years ago

  • Status changed from New to Ready For Testing
  • Target version set to 49
  • Pull request https://github.com/Katello/katello/pull/4437 added
  • Pull request deleted ()
Actions #2

Updated by Eric Helms over 9 years ago

  • Difficulty set to medium
  • Triaged changed from No to Yes
Actions #3

Updated by Eric Helms over 9 years ago

  • Target version changed from 49 to 54
Actions #4

Updated by Eric Helms over 9 years ago

  • Target version changed from 54 to 55
Actions #5

Updated by Eric Helms over 9 years ago

  • Target version changed from 55 to 56
Actions #6

Updated by Eric Helms over 9 years ago

  • Target version deleted (56)
Actions #7

Updated by The Foreman Bot over 9 years ago

  • Target version set to 62
Actions #8

Updated by Justin Sherrill over 9 years ago

  • Assignee set to Justin Sherrill
Actions #9

Updated by Justin Sherrill over 9 years ago

  • Status changed from Ready For Testing to Closed
  • % Done changed from 0 to 100
Actions #10

Updated by Eric Helms about 9 years ago

  • translation missing: en.field_release set to 23
Actions #11

Updated by Anonymous about 9 years ago

  • Pull request https://github.com/Katello/katello/pull/4871 added
  • Pull request deleted (https://github.com/Katello/katello/pull/4437)
Actions

Also available in: Atom PDF