Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
    jayjlawrence
    @jayjlawrence
    And I'm already using delayed job ... and it's a good start. Rocket job looked more promising. Too bad.
    michaelsalexander83
    @michaelsalexander83
    Hello everyone, im trying to implement the symmetric-encryption gem.
    I followed the documentation and guide but its unclear to me how to correctly implement. I run the gem in development and production mode ( staging lateron ) and want to encrypt and decrypt certain values.
    is there a working rails example application to look at and learn from?
    Also im confused, my development environment runs on my osx locally, my production environment runs on heroku. So now i have generated configuration file with symmetric-encryption --generate --keystore heroku --app-name myapp --environments "development,staging,production" but if im read correct this is only a config file for heroku and will not work for development. How can I have both development and production environments correctly configured
    michaelsalexander83
    @michaelsalexander83
    currently getting an error 'wrong final block length'
    michaelsalexander83
    @michaelsalexander83
    anyone around here? i was wondering if there is an example rails application with the gem implemented.
    currently stuck with an exception and no idea how to resolve
    Justin Lyman
    @justinlyman
    I have a field that is currently encrypted with a random_iv, and I need to switch it to not use a random_iv so I can do queries on the field. Is there an easy way to do this? (this question is regarding V4 of the symmetric-encryption gem, rails 5 w/ Active Record)
    Reid Morrison
    @reidmorrison
    Yes, deploy the code change to remove the random iv, then run a job to re-encrypt that column for every row in the table.
    When the newly encrypted value is saved back to the database it will no longer have a random iv.
    This approach allows the change to occur without any downtime.
    Justin Lyman
    @justinlyman
    Perfect, I was hoping that would be the case, Thanks Reid!
    istrasci
    @istrasci

    Hello, I'm using symmetric-encryption in my Rails model. I have many encrypted attributes defined as

    attribute <column_name>, :encrypted, random_iv: true, type: <type>

    Is there any way to programmatically get the type from the column name?

    Tiago Cássio
    @tiagocassio
    Hello, guys
    I'm trying to encrypt data with the following piece of code
    attribute :api_key, :encrypted, random_iv: false
    when i change the api_key with some value, the persisted value is not crypted
    why?
    Fernando Contreras
    @fercreek
    Hi!!
    I have a question, someone migrates her database from Heroku to amazon or google? I´m trying to move my info and I don't know how to that using symmetric encryption
    Lee Parham
    @parhaml
    Hello!
    Trying to get started with rocketjob, is anyone around to ensure a standalone app is configured correctly?
    Using rocketjob 5.3.2
    ...
    2020-07-06 11:14:58.229861 I [77459:rocketjob main] RocketJob::CLI -- Rails not detected. Running standalone: development
    2020-07-06 11:14:58.249127 W [77459:rocketjob main] Mongoid -- The BSON symbol type is deprecated; use String instead
    2020-07-06 11:14:58.249260 W [77459:rocketjob main] Mongoid -- The BSON symbol type is deprecated; use String instead
    2020-07-06 11:14:58.358640 W [77459:rocketjob main] Mongoid -- The BSON symbol type is deprecated; use String instead
    2020-07-06 11:14:58.364461 W [77459:rocketjob main] Mongoid -- The BSON symbol type is deprecated; use String instead
    2020-07-06 11:14:58.364619 W [77459:rocketjob main] Mongoid -- The BSON symbol type is deprecated; use String instead
    2020-07-06 11:14:58.370055 W [77459:rocketjob main] Mongoid -- The BSON symbol type is deprecated; use String instead
    2020-07-06 11:14:58.377821 W [77459:rocketjob main] Mongoid -- The BSON symbol type is deprecated; use String instead
    bundler: failed to load command: rocketjob (/Users/leeparham/.rbenv/versions/2.6.1/bin/rocketjob)
    2020-07-06 11:14:58.470919 W [77459:rocketjob main] Mongoid -- The BSON symbol type is deprecated; use String instead
    NameError: undefined local variable or method `connection' for RocketJob::Jobs::ReEncrypt::RelationalJob:Class
    Did you mean?  collection
      /Users/leeparham/.rbenv/versions/2.6.1/lib/ruby/gems/2.6.0/gems/rocketjob-5.3.2/lib/rocket_job/jobs/re_encrypt/relational_job.rb:43:in `block in <class:RelationalJob>'
      /Users/leeparham/.rbenv/versions/2.6.1/lib/ruby/gems/2.6.0/gems/activesupport-6.0.3.2/lib/active_support/core_ext/module/attribute_accessors.rb:70:in `block in mattr_reader'
      /Users/leeparham/.rbenv/versions/2.6.1/lib/ruby/gems/2.6.0/gems/activesupport-6.0.3.2/lib/active_support/core_ext/module/attribute_accessors.rb:52:in `each'
      /Users/leeparham/.rbenv/versions/2.6.1/lib/ruby/gems/2.6.0/gems/activesupport-6.0.3.2/lib/active_support/core_ext/module/attribute_accessors.rb:52:in `mattr_reader'
      /Users/leeparham/.rbenv/versions/2.6.1/lib/ruby/gems/2.6.0/gems/rocketjob-5.3.2/lib/rocket_job/jobs/re_encrypt/relational_job.rb:41:in `<class:RelationalJob>'
      /Users/leeparham/.rbenv/versions/2.6.1/lib/ruby/gems/2.6.0/gems/rocketjob-5.3.2/lib/rocket_job/jobs/re_encrypt/relational_job.rb:20:in `<module:ReEncrypt>'
      /Users/leeparham/.rbenv/versions/2.6.1/lib/ruby/gems/2.6.0/gems/rocketjob-5.3.2/lib/rocket_job/jobs/re_encrypt/relational_job.rb:19:in `<module:Jobs>'
      /Users/leeparham/.rbenv/versions/2.6.1/lib/ruby/gems/2.6.0/gems/rocketjob-5.3.2/lib/rocket_job/jobs/re_encrypt/relational_job.rb:18:in `<module:RocketJob>'
      /Users/leeparham/.rbenv/versions/2.6.1/lib/ruby/gems/2.6.0/gems/rocketjob-5.3.2/lib/rocket_job/jobs/re_encrypt/relational_job.rb:17:in `<top (required)>'
      /Users/leeparham/.rbenv/versions/2.6.1/lib/ruby/gems/2.6.0/gems/rocketjob-5.3.2/lib/rocket_job/cli.rb:167:in `require'
      /Users/leeparham/.rbenv/versions/2.6.1/lib/ruby/gems/2.6.0/gems/rocketjob-5.3.2/lib/rocket_job/cli.rb:167:in `block in eager_load_jobs'
      /Users/leeparham/.rbenv/versions/2.6.1/lib/ruby/gems/2.6.0/gems/rocketjob-5.3.2/lib/rocket_job/cli.rb:163:in `each'
      /Users/leeparham/.rbenv/versions/2.6.1/lib/ruby/gems/2.6.0/gems/rocketjob-5.3.2/lib/rocket_job/cli.rb:163:in `eager_load_jobs'
      /Users/leeparham/.rbenv/versions/2.6.1/lib/ruby/gems/2.6.0/gems/rocketjob-5.3.2/lib/rocket_job/cli.rb:116:in `boot_standalone'
      /Users/leeparham/.rbenv/versions/2.6.1/lib/ruby/gems/2.6.0/gems/rocketjob-5.3.2/lib/rocket_job/cli.rb:43:in `run'
      /Users/leeparham/.rbenv/versions/2.6.1/lib/ruby/gems/2.6.0/gems/rocketjob-5.3.2/bin/rocketjob:8:in `<top (required)>'
      /Users/leeparham/.rbenv/versions/2.6.1/bin/rocketjob:23:in `load'
      /Users/leeparham/.rbenv/versions/2.6.1/bin/rocketjob:23:in `<top (required)>'
    Lee Parham
    @parhaml
    It turns out that relational_job.rb needs sync_attr required
    begin
      require "active_record"
      require 'sync_attr'
    rescue LoadError
      raise 'RocketJob::Jobs::ReEncrypt::RelationalJob uses ActiveRecord to obtain the database connection, please install the gem "activerecord".'
    end
    Reid Morrison
    @reidmorrison
    Thank you for finding and resolving the issue. I pushed a permanent fix to the code base and will include it in the next version.
    Syed Sana Hassan
    @sana_hassan_twitter
    Hey, I am trying to send messages more than 1024 bytes but I see that it's getting truncated at around 1K (1026 to be exact), how can I increase the limit to log on a tcp rsyslog?
    Syed Sana Hassan
    @sana_hassan_twitter
    I am talking about Semantic Logger
    Syed Sana Hassan
    @sana_hassan_twitter
    Looks like the syslog_protocol gem is limiting it to 1024 chars.
    Reid Morrison
    @reidmorrison
    You could try implementing your own custom formatter that is derived from SemanticLogger::Formatters::Syslog and then see what the impact is if the limit is raised beyond 1024 chars by calling assemble instead of to_s on the packet?
    https://github.com/eric/syslog_protocol/blob/master/lib/syslog_protocol/packet.rb#L10
    If it works consider submitting a Pull Request that makes the max_size a configurable option for the formatter.
    Syed Sana Hassan
    @sana_hassan_twitter
    Ty, brilliant idea indeed I didn't see the last line https://github.com/rocketjob/semantic_logger/blob/master/lib/semantic_logger/formatters/syslog.rb#L80 and was hooked on to the packet, let me try to assemble it and see if it helps the packet size.
    Syed Sana Hassan
    @sana_hassan_twitter
    Syed Sana Hassan
    @sana_hassan_twitter
    @reidmorrison I believe the gem has to "tagged" with a new tag and "rails_semantic_logger" needs to be updated too? Would you be doing it or require a PR to update it?
    Reid Morrison
    @reidmorrison
    @sana_hassan_twitter Successfully registered gem: semantic_logger (4.7.2)
    Syed Sana Hassan
    @sana_hassan_twitter

    One thing I am getting is to include these two gems even though earlier I didn't have to include it in Gemfile, strange. Do you think it's a strange behavior?

    gem 'net_tcp_client' gem "syslog_protocol"

    Reid Morrison
    @reidmorrison
    Those are soft dependencies that are only needed when that specific appender is used.
    Sven Schwyn
    @svoop
    Hiya! I'm trying to encrypt large files asymmetrically. Turns out, the asymmetric part (encryption of a symmetric encryption secret) with openssl is quite easy, but I'm lacking a way to then symmetrically encrypt the large files on the filesystem without loading the entire file into memory. Then I found the symmetric-encryption gem which appears to fill this gap. Can you do this with symmetric-encryption alone or do you have to use iostreams as well? Maybe have an example for this use case?
    Sven Schwyn
    @svoop
    The docs are excellent and https://iostreams.rocketjob.io/tutorial mentions this use case, however, there's no example of how to best combine a reader and a writer to – say – to encrypt a large JPEG on the filesystem with minimal memory footprint.
    Reid Morrison
    @reidmorrison
    # Using Symmetric Encryption directly
    File.open("README.md", "r") do |reader|
      SymmetricEncryption::Writer.open("README.md.enc") do |writer|
        IO.copy_stream(reader, writer)
      end
    end
    
    # Using IOStreams
    source = IOStreams.path("README.md")
    IOStreams.path("README.md.enc").copy_from(source)
    OpenCoderX
    @OpenCoderX
    Hello, Licensing questions. Are all the features at https://rocketjob.io available with the OSS license, if so that is really great. We currently have a project that uses OSS sidekiq and are not excited about the rather expensive license required to create batches, can you give us a rundown of sidekiq vs. rocketjob, if that is an appropriate topic?
    Reid Morrison
    @reidmorrison
    Yes, all batch capabilities are included in the regular Rocket Job gem. There is no pro or enterprise edition hiding away capabilities such as encryption or compression of inflight data
    Reid Morrison
    @reidmorrison
    We wrote Rocket Job because we could not get Sidekiq batch to scale to thousands of workers processing multi gigabyte files against terabyte sized databases. Rocket Job is used to perform all batch processing, from on-demand files to scheduled jobs at our company. A key business requirement is to be able to set the priority on a per job basis so that urgent jobs are processed first, allowing less important very large jobs to run as long as needed across thousands of workers.
    I believe the scalability and capabilities in Rocket Job far exceed any batch capabilities in Sidekiq pro or enterprise editions. And all of that is fully open source in Rocket Job at no additional cost.
    Reid Morrison
    @reidmorrison
    *at no cost
    OpenCoderX
    @OpenCoderX
    Thank You @reidmorrison!
    OpenCoderX
    @OpenCoderX
    Does anyone use mission_control with Rails 5? I notice the gemfile is pinned to 6.
    Reid Morrison
    @reidmorrison
    We are still on Rails 5, hoping to upgrade to Rails 6 soon. Mission control works great on Rails 5.
    Mission control is tested on Rails 5 and Rails 6 according to the Appraisal file.
    OpenCoderX
    @OpenCoderX
    Is systemd the preferred method to manage the rocketjob processes? Does anyone have a template service file I can use?
    Reid Morrison
    @reidmorrison
    There is no “preferred method”, since everyone has their favorite and often platform specific way of running processes.
    We run one Rocket Job process per docker container and tell AWS ECS to restart the containers if they are stopped. Before that we used Capistrano to start the required number of Rocket job processes per server.
    Jeremy Kreutzbender
    @jer-k
    Should upgrading Rails break the decryption from symmetric-encryption? I just generated a new encryption file while on Rails 6.0.1, wrote a user record with an encrypted password and I am able to successfully retrieve the un-encrypted password. I update Rails to 6.0.3.5 and try to retrieve the password and it is not able to be decrypted and returns nil. Kind of at a loss on what to do
    Jeremy Kreutzbender
    @jer-k
    Seems to be an issue with the specific field. Tested with some different fields and everything is working. Disregard :)