Bug 1254689 - Storing big file as a secret in vault raises traceback
Storing big file as a secret in vault raises traceback
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: ipa (Show other bugs)
7.2
Unspecified Unspecified
unspecified Severity unspecified
: rc
: ---
Assigned To: IPA Maintainers
Namita Soman
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2015-08-18 12:29 EDT by Petr Vobornik
Modified: 2015-11-19 07:05 EST (History)
3 users (show)

See Also:
Fixed In Version: ipa-4.2.0-8.el7
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2015-11-19 07:05:42 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Petr Vobornik 2015-08-18 12:29:27 EDT
This bug is created as a clone of upstream ticket:
https://fedorahosted.org/freeipa/ticket/5231

VERSION: 4.2.90.201508141119GITfe91c37, API_VERSION: 2.148

{{{
-sh-4.3$ dd if=/dev/zero of=huge-file bs=1024k count=100; ipa vault-archive SharedG3 --shared --in=huge-file; rm -rf huge-file
100+0 records in
100+0 records out
104857600 bytes (105 MB) copied, 0.219098 s, 479 MB/s
ipa: ERROR: non-public: MemoryError: 
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/ipalib/backend.py", line 130, in execute
    result = self.Command[_name](*args, **options)
  File "/usr/lib/python2.7/site-packages/ipalib/frontend.py", line 443, in __call__
    ret = self.run(*args, **options)
  File "/usr/lib/python2.7/site-packages/ipalib/frontend.py", line 1109, in run
    return self.forward(*args, **options)
  File "/usr/lib/python2.7/site-packages/ipalib/plugins/vault.py", line 1091, in forward
    return self.api.Command.vault_archive_internal(*args, **options)
  File "/usr/lib/python2.7/site-packages/ipalib/frontend.py", line 443, in __call__
    ret = self.run(*args, **options)
  File "/usr/lib/python2.7/site-packages/ipalib/frontend.py", line 761, in run
    return self.forward(*args, **options)
  File "/usr/lib/python2.7/site-packages/ipalib/frontend.py", line 782, in forward
    return self.Backend.rpcclient.forward(self.name, *args, **kw)
  File "/usr/lib/python2.7/site-packages/ipalib/rpc.py", line 950, in forward
    return self._call_command(command, params)
  File "/usr/lib/python2.7/site-packages/ipalib/rpc.py", line 927, in _call_command
    return command(*params)
  File "/usr/lib/python2.7/site-packages/ipalib/rpc.py", line 1078, in _call
    return self.__request(name, args)
  File "/usr/lib/python2.7/site-packages/ipalib/rpc.py", line 1047, in __request
    verbose=self.__verbose >= 3,
  File "/usr/lib64/python2.7/xmlrpclib.py", line 1280, in request
    return self.single_request(host, handler, request_body, verbose)
  File "/usr/lib/python2.7/site-packages/ipalib/rpc.py", line 614, in single_request
    self.send_content(h, request_body)
  File "/usr/lib/python2.7/site-packages/ipalib/rpc.py", line 425, in send_content
    connection.endheaders(request_body)
  File "/usr/lib/python2.7/site-packages/ipapython/nsslib.py", line 291, in endheaders
    httplib.HTTPConnection.endheaders(self, message)
  File "/usr/lib64/python2.7/httplib.py", line 1049, in endheaders
    self._send_output(message_body)
  File "/usr/lib64/python2.7/httplib.py", line 891, in _send_output
    msg += message_body
MemoryError
ipa: ERROR: an internal error has occurred
}}}
Comment 1 Petr Vobornik 2015-08-26 10:17:33 EDT
Fixed upstream
master:
https://fedorahosted.org/freeipa/changeset/02ab34c60b5e624ef0653a473316633a5618b07c
ipa-4-2:
https://fedorahosted.org/freeipa/changeset/9fc82bc66992eaa5daeed80e366e10986a8583d8

Maximum file size for data in vault-archive command was set to 1MB.
Comment 3 Scott Poore 2015-09-02 18:56:27 EDT
Verified.

Version ::

ipa-server-4.2.0-8.el7.x86_64

Results ::

[root@master ~]# ipa vault-add myvault_shared --shared --type=symmetric --password=Secret123
----------------------------
Added vault "myvault_shared"
----------------------------
  Vault name: myvault_shared
  Type: symmetric
  Salt: uSV/PLryw6ezPOoS3F9ghw==
  Owner users: admin
  Shared vault: True

[root@master ~]# dd if=/dev/zero of=huge-file bs=1024k count=100
100+0 records in
100+0 records out
104857600 bytes (105 MB) copied, 0.0987493 s, 1.1 GB/s

[root@master ~]# ls -lh huge-file 
-rw-r--r--. 1 root root 100M Sep  2 17:51 huge-file

[root@master ~]# ipa vault-archive myvault_shared --shared --password=Secret123 --in=huge-file 
ipa: ERROR: invalid 'in': Size of data exceeds the limit. Current vault data size limit is 1048576 B

[root@master ~]# ipa vault-archive myvault_shared --shared --password=Secret123 --in=/usr/share/dict/linux.words 
ipa: ERROR: invalid 'in': Size of data exceeds the limit. Current vault data size limit is 1048576 B
Comment 4 errata-xmlrpc 2015-11-19 07:05:42 EST
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHBA-2015-2362.html

Note You need to log in before you can comment on or make changes to this bug.