The Wiert Corner – irregular stream of stuff

Jeroen W. Pluimers on .NET, C#, Delphi, databases, and personal interests

  • My badges

  • Twitter Updates

  • My Flickr Stream

  • Pages

  • All categories

  • Enter your email address to subscribe to this blog and receive notifications of new posts by email.

    Join 1,735 other followers

Archive for January 17th, 2018

Using hardware security tokens cross-platform is only slightly more complicat…

Posted by jpluimers on 2018/01/17

Thanks for the excellent comment explaining how to use hardware tokens as a comment to [WayBack] Using hardware security tokens cross-platform is only slightly more complicated than piloting a Space Shuttle. ##sarcasm – Jan Wildeboer – Google+

Jan Wildeboer:

+Jeroen Wiert Pluimers OK. Let’s look a bit at how this works. There are several competing standards/ways to use a security token. Typically you’ll decide between the two most used ones. As a CCID device AKA SmartCard with OpenSC or using gpg-agent. And that’s an either/or question. Some of the security tokens can only work with gpg-agent, some can do both (but not at the same time) and some are only useful as CCID style (e.g. the Nitrokey HSM).

OK. So now we look at platforms. CCID using OpenSC mostly works everywhere, but you might need to install some additional software depending on your OS. Older versions of MacOS X were notoriously bad, since (High) Sierra it has become better.

On Linux it again really depends. The gnome-keyring-agent that is active in a Gnome session really messes everything up, so better deactivate that. Which is not really trivial. But you have to have a socket for ssh-agent to pick up the key, so some stuff goes to your .bash.rc and you have to make some changes to Gnome config.

If you want to use a Yubikey for 2FA, note that it cannot do TOTP (Time based One Time Password) which Amazon wants for AWS auth. So you need another helper app on your computer.

Here’s some articles that explain it in detail:

The middle two links are actually part of the series [WayBack] Yubikey All The Things | EngineerBetter | More than Cloud Foundry specialists which has a third post [WayBack] Yubikeys for Static Secrets | EngineerBetter | More than Cloud Foundry specialists

–jeroen

Posted in *nix, *nix-tools, Communications Development, Development, Internet protocol suite, Power User, Security, SSH, TCP | Leave a Comment »

Convert space indented text to markdown minus indented

Posted by jpluimers on 2018/01/17

Since I will never be good at regex, this are a few search/replace patterns I used in Atom.io to convert a plain text document space indented like this:

Version 1.23.4.15
First level indented text
Is also a first level indented text
Too a first level indented text
- First level indented text too
  Second level indented text
  Is also a second level indented text
  Too a second level indented text
  - Second level indented text too
    - A third level indented text
    Third level indented text
    Is also a third level indented text
    Too a third level indented text
98.4.32.1

to a Markdown indented one like this:

Version 1.23.4.15
- First level indented text
- Is also a first level indented text
- Too a first level indented text
- First level indented text too
 - Second level indented text
 - Is also a second level indented text
 - Too a second level indented text
 - Second level indented text too
 - A third level indented text
 - Third level indented text
 - Is also a third level indented text
 - Too a third level indented text
Version 98.4.32.1

Prepend Version when needed: https://regex101.com/r/CUhUbr/1

  • Search:
    • ^(\d+\.\d+\.\d+\.\d+)
  • Replace:
    • Version $1

Add markdown first level indentations to lines that don’t have a markdown first level indentation yet, nor start with Version nor start with a space: https://regex101.com/r/CUhUbr/2

  • Search:
    • ^(?!(Version )|(- )|( )|(\d+\.\d+\.\d+\.\d+))(.*)
  • Replace:
    • - $5

Add markdown second level indentations to lines that don’t have a markdown second level indentation yet but do have a regular second level indentation: https://regex101.com/r/CUhUbr/3

  • Search:
    • ^  (?!(- )|( ))(.*)
  • Replace:
    •   - $3

Add markdown third level indentations to lines that don’t have a markdown third level indentation yet but do have a regular third level indentation: https://regex101.com/r/CUhUbr/4

  • Search:
    • ^    (?!(- )|( ))(.*)
  • Replace:
    •     - $3

jeroen

https://regex101.com/r/CUhUbr/1

https://regex101.com/r/CUhUbr/2

https://regex101.com/r/CUhUbr/3

https://regex101.com/r/CUhUbr/4

 

Posted in Development, RegEx, Software Development | Leave a Comment »

Links to various Visual C++ Redistributable Packages for Visual Studio downloads (arm/x64/x86 when available)

Posted by jpluimers on 2018/01/17

Link archive so I know how to get the 64-bit ARM, 32-bit Win32/x86 and 64-bit Win64/x64 downloads for the Visual C++ Redistributable files.

Note the various names of pages and files Microsoft uses.

–jeroen

Posted in C++, Development, Software Development, Visual Studio C++ | Leave a Comment »

 
%d bloggers like this: