oxidized icon indicating copy to clipboard operation
oxidized copied to clipboard

Problem with changing ios.rb

Open Devodest opened this issue 1 year ago • 3 comments

Good time.

Can you please advise.

I made changes to ios.rb image image So that I have one more point hidden, but after applying it and restarting Docker, nothing changes for me.

After application, the line does not disappear anywhere. The password is there in clear text, I don’t want it to be visible. Please tell me what I need to do.

Devodest avatar Jun 06 '24 11:06 Devodest

I can't do anything with this issue. Please:

  • Use text and no screenshots
  • Describe what the problem is

robertcheramy avatar Jun 14 '24 13:06 robertcheramy

@robertcheramy I'm trying to change the "ios.rb" file in the / directory /root/oxidized/lib/oxidized/model By adding 1 more way to hide a password that is not specified in ios.rb

cmd :secret do |cfg|
cfg.gsub! /^(\s+path sftp:\/\/).*/, '\\1 <Path: removed>'

or I'm trying to change the comments in the files instead of secret hidden to something else and after restart docker compose nothing changes My path in cisco catalyst

path sftp://user:password@ip//upload/Catalyst-archive/C9k-IX-MSK-AG-SW/$h$t

still visible on the oxi web page

I save configurations using git

What needs to be done to hide my password on the web and write

path sftp://<Path: removed>

Devodest avatar Jun 14 '24 14:06 Devodest

I accidentally closed

Devodest avatar Jun 14 '24 14:06 Devodest

Can somebody help?

Devodest avatar Jul 29 '24 17:07 Devodest

Launch irb, enter your config, and test the regexp until you get someting you like:

$ irb
irb(main):001:0" cfg = "hallo
irb(main):002:0" test
irb(main):003:0" path sftp://user:password@ip//upload/Catalyst-archive/C9k-IX-MSK-AG-SW/$h$t
irb(main):004:0" End of config
irb(main):005:0> "
=> "hallo\ntest\npath sftp://user:password@ip//upload/Catalyst-archive/C9k-IX-MSK-AG-SW/$h$t\nEnd of config\n"
irb(main):006:0> cfg.gsub! /^(\s+path sftp:\/\/).*/, '\\1 <Path: removed>'
=> nil
irb(main):007:0> cfg.gsub! /(path sftp:\/\/).*/, '\\1 <Path: removed>'
=> "hallo\ntest\npath sftp:// <Path: removed>\nEnd of config\n"

robertcheramy avatar Jul 30 '24 07:07 robertcheramy