Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
Red Hat Satellite engineering is moving the tracking of its product development work on Satellite to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "Satellite project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs will be migrated starting at the end of May. If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "Satellite project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/SAT-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 1293296

Summary: oscap policy name can be created more than 255 chars
Product: Red Hat Satellite Reporter: Kedar Bidarkar <kbidarka>
Component: SCAP PluginAssignee: Marek Hulan <mhulan>
Status: CLOSED NEXTRELEASE QA Contact:
Severity: low Docs Contact:
Priority: low    
Version: 6.1.5CC: bbuckingham, bkearney, ehelms, jcallaha, mhulan, oshtaier
Target Milestone: UnspecifiedKeywords: Reopened, Triaged
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
URL: http://projects.theforeman.org/issues/12900
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-08-01 19:57:45 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Kedar Bidarkar 2015-12-21 11:08:57 UTC
Description of problem:

Currently oscap policy name field accepts more than 255 chars and this needs to be checked while adding it in the field itself.

We face the below issues while clicking the submit button.

PGError: ERROR: value too long for type character varying(255) : INSERT INTO "scaptimony_policies" ("created_at", "cron_line", "day_of_month", "description", "name", "period", "scap_content_id", "scap_content_profile_id", "updated_at", "weekday") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10) RETURNING "id"


2015-12-21 16:26:14 [I] Processing by ScaptimonyPoliciesController#create as HTML
2015-12-21 16:26:14 [I]   Parameters: {"utf8"=>"✓", "authenticity_token"=>"9d+EQhT93SuywO2kHu1ubkWx7ArbU6qbGE6DFMeCrz0=", "policy"=>{"current_step"=>"", "name"=>"wJNLfPbexTKCGSGdqWjfOsYbetvPhzTBrptteHCIUcjYaacfDzyDnfVmOdsZQWcfIWDfXoLuJLtwEPHjCpSoIzSsYnhBqDcovaLsfHYQtHVQEeNORkhydwKaTqcivVPaCaZQFoRZPWJZCetgRphracvkyMUjKRayVaCrvaLaBBbjOjeWlknHUFpRsLHQkvbuvsZGxWqEMfmwfNIoknRoDaWRFPpoCMtEitUdRUAlyEGGeswFlDsUhlWCFKaZHSizOplYRcVDdxtBmkPjdNrwFEWVdMgnPWWOaiOvMsUhMbXc", "description"=>"", "scap_content_id"=>"14", "scap_content_profile_id"=>"114", "period"=>"weekly", "weekday"=>"sunday", "day_of_month"=>"", "cron_line"=>"", "location_ids"=>[""], "organization_ids"=>["", "1"], "hostgroup_ids"=>[""]}, "commit"=>"Submit"}

2015-12-21 16:26:14 [W] Operation FAILED: PGError: ERROR:  value too long for type character varying(255)
: INSERT INTO "scaptimony_policies" ("created_at", "cron_line", "day_of_month", "description", "name", "period", "scap_content_id", "scap_content_profile_id", "updated_at", "weekday") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10) RETURNING "id"
2015-12-21 16:26:14 [I]   Rendered common/500.html.erb within layouts/application (19.8ms)
2015-12-21 16:26:14 [I]   Rendered layouts/base.html.erb (3.6ms)
2015-12-21 16:26:14 [I] Completed 500 Internal Server Error in 126ms (Views: 33.6ms | ActiveRecord: 17.4ms)
2015-12-21 16:29:14 [I] Processing by HostsController#externalNodes as YML




Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1. Try creating a oscap - policy with more than 255 chars
2. Provide all the entries and click submit.
3.

Actual results:
oscap policy_name field accepts more than 255 chars

Expected results:
oscap policy_name field should detect more than 255 chars and report to the user that the length is too long.

Additional info:

Comment 2 Bryan Kearney 2015-12-21 16:32:55 UTC
Created redmine issue http://projects.theforeman.org/issues/12900 from this bug

Comment 3 Bryan Kearney 2016-02-02 11:14:54 UTC

*** This bug has been marked as a duplicate of bug 1289571 ***

Comment 5 Oleksandr Shtaier 2016-05-15 13:32:56 UTC
It is not a duplicate of 1289571 since here we are talking about OSCAP policy and in 1289571 about OSCAP content. These are two different entities

Comment 6 Bryan Kearney 2016-07-26 15:25:24 UTC
Moving 6.2 bugs out to sat-backlog.

Comment 7 Bryan Kearney 2016-07-26 15:37:38 UTC
Moving 6.2 bugs out to sat-backlog.

Comment 9 Bryan Kearney 2016-09-12 12:11:41 UTC
Upstream bug assigned to mhulan

Comment 10 Bryan Kearney 2016-09-12 12:11:44 UTC
Upstream bug assigned to mhulan

Comment 11 Bryan Kearney 2016-09-13 10:11:35 UTC
Moving this bug to POST for triage into Satellite 6 since the upstream issue http://projects.theforeman.org/issues/12900 has been resolved.

Comment 16 Bryan Kearney 2017-08-01 19:57:45 UTC
The fix to this bug will be delivered with release 6.3 of Satellite.