<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	>
<channel>
	<title>Comments for Cosine Jeremiah and his Musings</title>
	<atom:link href="http://www.cosine.org/comments/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.cosine.org</link>
	<description>Life and Ruby and Security</description>
	<pubDate>Sat, 22 Nov 2008 02:14:17 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6.2</generator>
		<item>
		<title>Comment on WS-Security versus SOA over SSL by Cosine Jeremiah</title>
		<link>http://www.cosine.org/2007/10/25/wss-vs-ssl/#comment-404</link>
		<dc:creator>Cosine Jeremiah</dc:creator>
		<pubDate>Sat, 27 Oct 2007 21:33:21 +0000</pubDate>
		<guid isPermaLink="false">http://www.cosine.org/2007/10/25/wss-vs-ssl/#comment-404</guid>
		<description>It is true one could use WS-Security in a mode that would spare the use of some of the asymmetric encryption, but I think the ideal of doing things with the most stringent security would have both encryption and signing certificates used by both the client and the server.  Thus I did not really consider doing it any other way for the purpose of this comparison.

The asymmetric encryption used to protect the message is always just to encrypt a symmetric encryption key that is used to encrypt the actual contents of the message, as you said (and like SSL as you also said).  Even so, that little bit of asymmetric encryption gets expensive when multiplied by a heavy load of messages.  The symmetric encryption computation time, on the other hand, is cake by comparison.

Let me know if your understanding is different.</description>
		<content:encoded><![CDATA[<p>It is true one could use WS-Security in a mode that would spare the use of some of the asymmetric encryption, but I think the ideal of doing things with the most stringent security would have both encryption and signing certificates used by both the client and the server.  Thus I did not really consider doing it any other way for the purpose of this comparison.</p>
<p>The asymmetric encryption used to protect the message is always just to encrypt a symmetric encryption key that is used to encrypt the actual contents of the message, as you said (and like SSL as you also said).  Even so, that little bit of asymmetric encryption gets expensive when multiplied by a heavy load of messages.  The symmetric encryption computation time, on the other hand, is cake by comparison.</p>
<p>Let me know if your understanding is different.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on WS-Security versus SOA over SSL by Ryan</title>
		<link>http://www.cosine.org/2007/10/25/wss-vs-ssl/#comment-352</link>
		<dc:creator>Ryan</dc:creator>
		<pubDate>Fri, 26 Oct 2007 02:13:04 +0000</pubDate>
		<guid isPermaLink="false">http://www.cosine.org/2007/10/25/wss-vs-ssl/#comment-352</guid>
		<description>Good summary.  You do seem to be forgetting or missing one of the modes WS-Security can operate in.

"whereas WS-Security needs to perform asymmetric key encryption on each message (one computation for handling encryption and one computation for handling the signature)"

While you can't get away from the need for a server certificate, you can use WS-Security without a client certificate, and you often will use symmetric encryption as part of the message.  You're right that you'll definitely use asymmetric in the message, but it might be used just for key exchange like SSL.  Actually I think this is the more common usage.  Of course it's still per message.</description>
		<content:encoded><![CDATA[<p>Good summary.  You do seem to be forgetting or missing one of the modes WS-Security can operate in.</p>
<p>&#8220;whereas WS-Security needs to perform asymmetric key encryption on each message (one computation for handling encryption and one computation for handling the signature)&#8221;</p>
<p>While you can&#8217;t get away from the need for a server certificate, you can use WS-Security without a client certificate, and you often will use symmetric encryption as part of the message.  You&#8217;re right that you&#8217;ll definitely use asymmetric in the message, but it might be used just for key exchange like SSL.  Actually I think this is the more common usage.  Of course it&#8217;s still per message.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Bolting on Security by Cosine Jeremiah</title>
		<link>http://www.cosine.org/2007/09/14/bolting-security/#comment-21</link>
		<dc:creator>Cosine Jeremiah</dc:creator>
		<pubDate>Sat, 15 Sep 2007 23:45:13 +0000</pubDate>
		<guid isPermaLink="false">http://www.cosine.org/2007/09/14/bolting-security/#comment-21</guid>
		<description>I agree port 22 is often not scrutinized as much as it should be, but having previously been at a company that did scrutinize some port 22 connections before allowing it in the end, I can say that with SSH the protocol and server binaries are documented to a degree that makes it possible to answer the hard questions during the scrutiny.  This is not so with port 445.

And let us not even get started with how ports 80 and 443 are abused through firewalls! :)</description>
		<content:encoded><![CDATA[<p>I agree port 22 is often not scrutinized as much as it should be, but having previously been at a company that did scrutinize some port 22 connections before allowing it in the end, I can say that with SSH the protocol and server binaries are documented to a degree that makes it possible to answer the hard questions during the scrutiny.  This is not so with port 445.</p>
<p>And let us not even get started with how ports 80 and 443 are abused through firewalls! <img src='http://www.cosine.org/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /></p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Bolting on Security by Ryan</title>
		<link>http://www.cosine.org/2007/09/14/bolting-security/#comment-20</link>
		<dc:creator>Ryan</dc:creator>
		<pubDate>Sat, 15 Sep 2007 07:49:36 +0000</pubDate>
		<guid isPermaLink="false">http://www.cosine.org/2007/09/14/bolting-security/#comment-20</guid>
		<description>Security can never be bolted on afterwords, that's true, but they security apparatus's can be extended.  Extension with security will never make you're application more secure, that's impossible, since how secure you're application is is lowest common denominator.

What extension can do is provide user conveniences.  Security in Windows 2003 at a protocol level is basically the same as 2000.  Unfortunately both still by default enable support for the Windows 98 protocols.  Windows 2008 changes this, but anyone can disable the Windows 98 protocols as is.  So there we see subtraction adding to security.

At the same time, Windows 2003 and Windows 2008 make an administrator's job much easier without reducing security.  In an effective sense they raise it by making it more likely they'll know how to or have time to make the appropriate choices.  Though pure security may not change much, effective does.  Of course, management may instead take the efficiency improvements and roll them into staff cuts or more work, or more process, but that is an age old cause of many problems.

As far as 445 goes, I'm not sure why it's more highly scrutinized than 22.  It may be a mistake that 22 isn't more scrutinized.  I've heard of plenty of attacks that originated here.  In fact, most UNIX attacks I recall any details of did.  Perhaps it's just a community bias that would leave such blind spots.

I'd say in both cases, that these are need to know ports.  Applications services should use ports that are easier to separately monitor and control if you're approaching it from a security perspective.  If you approach it from any other perspective they should use ports 80/443 exclusively to subvert all security restrictions. ;p</description>
		<content:encoded><![CDATA[<p>Security can never be bolted on afterwords, that&#8217;s true, but they security apparatus&#8217;s can be extended.  Extension with security will never make you&#8217;re application more secure, that&#8217;s impossible, since how secure you&#8217;re application is is lowest common denominator.</p>
<p>What extension can do is provide user conveniences.  Security in Windows 2003 at a protocol level is basically the same as 2000.  Unfortunately both still by default enable support for the Windows 98 protocols.  Windows 2008 changes this, but anyone can disable the Windows 98 protocols as is.  So there we see subtraction adding to security.</p>
<p>At the same time, Windows 2003 and Windows 2008 make an administrator&#8217;s job much easier without reducing security.  In an effective sense they raise it by making it more likely they&#8217;ll know how to or have time to make the appropriate choices.  Though pure security may not change much, effective does.  Of course, management may instead take the efficiency improvements and roll them into staff cuts or more work, or more process, but that is an age old cause of many problems.</p>
<p>As far as 445 goes, I&#8217;m not sure why it&#8217;s more highly scrutinized than 22.  It may be a mistake that 22 isn&#8217;t more scrutinized.  I&#8217;ve heard of plenty of attacks that originated here.  In fact, most UNIX attacks I recall any details of did.  Perhaps it&#8217;s just a community bias that would leave such blind spots.</p>
<p>I&#8217;d say in both cases, that these are need to know ports.  Applications services should use ports that are easier to separately monitor and control if you&#8217;re approaching it from a security perspective.  If you approach it from any other perspective they should use ports 80/443 exclusively to subvert all security restrictions. ;p</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Why Use a Language-Powered Domain Specific Language? by hashbangperl</title>
		<link>http://www.cosine.org/2007/08/16/languagepowered-domain-specific-language/#comment-10</link>
		<dc:creator>hashbangperl</dc:creator>
		<pubDate>Fri, 17 Aug 2007 13:18:56 +0000</pubDate>
		<guid isPermaLink="false">http://www.cosine.org/2007/08/16/languagepowered-domain-specific-language/#comment-10</guid>
		<description>Cosine,

Quite why are you evaluating random code for configuration - doesn't ruby have decent support for configuration files?

I replied before about this - the example you give is so unhelpful that I don't see any case at all for what you're going on about.

In my experience the occasions where you want some kind of 'quick and dirty on the fly evaluated user input' that you call a DSL, are exactly the times when you have a domain specific problem that a domain specific API should handle well with a proper parser.

For example in my work I handle human and computer created data feeds from Air Traffic services, The Met Office, US DoD, ICAO, etc, all of this data is parsed properly through a lexer with validation, edge case handling, and then fed into the system through the same clear and documented OO API that it will be retrieved through.

I'm trying but failing to see a good scenario for what you're proposing - a good DSL is very hard to create, not technically but through the difficulty of the design decisions - the implementation in any language is the most trivial part - perhaps the reason we don't use Quick/Dirty Pseudo-DSL like Ruby programmers is because many of us know that a better solution to the problem is usually available and done properly on CPAN or requires up front design time in doing it right (which rules out a DSL in 99.9% of cases).</description>
		<content:encoded><![CDATA[<p>Cosine,</p>
<p>Quite why are you evaluating random code for configuration - doesn&#8217;t ruby have decent support for configuration files?</p>
<p>I replied before about this - the example you give is so unhelpful that I don&#8217;t see any case at all for what you&#8217;re going on about.</p>
<p>In my experience the occasions where you want some kind of &#8216;quick and dirty on the fly evaluated user input&#8217; that you call a DSL, are exactly the times when you have a domain specific problem that a domain specific API should handle well with a proper parser.</p>
<p>For example in my work I handle human and computer created data feeds from Air Traffic services, The Met Office, US DoD, ICAO, etc, all of this data is parsed properly through a lexer with validation, edge case handling, and then fed into the system through the same clear and documented OO API that it will be retrieved through.</p>
<p>I&#8217;m trying but failing to see a good scenario for what you&#8217;re proposing - a good DSL is very hard to create, not technically but through the difficulty of the design decisions - the implementation in any language is the most trivial part - perhaps the reason we don&#8217;t use Quick/Dirty Pseudo-DSL like Ruby programmers is because many of us know that a better solution to the problem is usually available and done properly on CPAN or requires up front design time in doing it right (which rules out a DSL in 99.9% of cases).</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Domain Specific Languages by mst</title>
		<link>http://www.cosine.org/2007/08/05/domain-specific-languages/#comment-9</link>
		<dc:creator>mst</dc:creator>
		<pubDate>Fri, 17 Aug 2007 05:59:50 +0000</pubDate>
		<guid isPermaLink="false">http://www.cosine.org/2007/08/05/domain-specific-languages/#comment-9</guid>
		<description>Here's how I'd write it (code not actually tested but should be close enough) -

package DoStuff;

use Moose;
use IO::All;

has 'func' =&#62; (is =&#62; 'rw');

sub BUILD {
  my $self = shift;
  local *do_stuff = sub (&#38;) { $self-&#62;func($_[0]); };
  eval io('config')-&#62;slurp;
}

sub run_func { shift-&#62;func-&#62;(); }

Wonderful thing, modern perl.</description>
		<content:encoded><![CDATA[<p>Here&#8217;s how I&#8217;d write it (code not actually tested but should be close enough) -</p>
<p>package DoStuff;</p>
<p>use Moose;<br />
use IO::All;</p>
<p>has &#8216;func&#8217; =&gt; (is =&gt; &#8216;rw&#8217;);</p>
<p>sub BUILD {<br />
  my $self = shift;<br />
  local *do_stuff = sub (&amp;) { $self-&gt;func($_[0]); };<br />
  eval io(&#8217;config&#8217;)-&gt;slurp;<br />
}</p>
<p>sub run_func { shift-&gt;func-&gt;(); }</p>
<p>Wonderful thing, modern perl.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Why Use a Language-Powered Domain Specific Language? by Cosine Jeremiah</title>
		<link>http://www.cosine.org/2007/08/16/languagepowered-domain-specific-language/#comment-8</link>
		<dc:creator>Cosine Jeremiah</dc:creator>
		<pubDate>Thu, 16 Aug 2007 19:11:12 +0000</pubDate>
		<guid isPermaLink="false">http://www.cosine.org/2007/08/16/languagepowered-domain-specific-language/#comment-8</guid>
		<description>&lt;blockquote&gt;That being said, it really sounds like you and I donâ€™t have a significant difference of opinion here once we recognize that weâ€™re using different definitions for similar terms, hence the disconnect.&lt;/blockquote&gt;

I agree.  Thanks!

While I like to promote the use of DSLs via string eval, I would not use it for any of the above examples that you present where a lexer and parser would be superior (further affirming your point that we agree on a lot).  Your point about taking data in different formats is not one I considered, but I would not trust externally submitted data enough to pass to eval anyway.

I have never considered a situation where a parser might be taking input from any one of several lexers.  Mine have always been married in a way because I was focused on one type of input.  Nifty idea for me to churn on! :-D</description>
		<content:encoded><![CDATA[<blockquote><p>That being said, it really sounds like you and I donâ€™t have a significant difference of opinion here once we recognize that weâ€™re using different definitions for similar terms, hence the disconnect.</p></blockquote>
<p>I agree.  Thanks!</p>
<p>While I like to promote the use of DSLs via string eval, I would not use it for any of the above examples that you present where a lexer and parser would be superior (further affirming your point that we agree on a lot).  Your point about taking data in different formats is not one I considered, but I would not trust externally submitted data enough to pass to eval anyway.</p>
<p>I have never considered a situation where a parser might be taking input from any one of several lexers.  Mine have always been married in a way because I was focused on one type of input.  Nifty idea for me to churn on! <img src='http://www.cosine.org/wp-includes/images/smilies/icon_biggrin.gif' alt=':-D' class='wp-smiley' /></p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Why Use a Language-Powered Domain Specific Language? by Ovid</title>
		<link>http://www.cosine.org/2007/08/16/languagepowered-domain-specific-language/#comment-7</link>
		<dc:creator>Ovid</dc:creator>
		<pubDate>Thu, 16 Aug 2007 15:19:58 +0000</pubDate>
		<guid isPermaLink="false">http://www.cosine.org/2007/08/16/languagepowered-domain-specific-language/#comment-7</guid>
		<description>&lt;blockquote&gt;Do not use language-powered DSLs when writing a parser is clearly superior, such as when the input cannot be trusted.&lt;/blockquote&gt;

This is perhaps one of the most significant issues I have with a "language-powered DSL" (a.k.a., &lt;a href="http://www.martinfowler.com/bliki/FluentInterface.html" rel="nofollow"&gt;fluent interfaces&lt;/a&gt;).  If there's even the slightest danger of untrusted input, then I strongly object to them.  However, people will disagree as to what constitutes "untrusted input".  To my mind, this means any code coming from outside of the program, even it's just a simple file that someone down in accounting can edit.  I may be overly paranoid on this point, however.

More importantly, the who concept of fluid interface is just good programming.  It's a difficult skill to develop.  That some people refer to these as DSLs where others do not makes a lot of the point moot.  In Perl's case, we do have a string eval which does this, but if implemented incorrectly, can lose some context (I'd love to easily be able to run an eval against a higher stack frame).

For myself, I distinguish between fluent interfaces and DSLs because the former, as mentioned, is just good programming and is not restricted to a problem domain while the latter is harder to implement, tends to be more restricted, but offers a greater expressiveness if suitably done.  Plus, by separating the lexing and parsing, you can gain a lot of flexibility if someone needs to submit their data in an XML format but your DSL is natural language.  Just write a separate lexer and use the same grammar!  The decoupling of these steps is trivial and since Perl is so powerful when it comes to text manipulation, it's well-suited for this.

That being said, it really sounds like you and I don't have a significant difference of opinion here once we recognize that we're using different definitions for similar terms, hence the disconnect.

(And I really wish you had a preview button here :)</description>
		<content:encoded><![CDATA[<blockquote><p>Do not use language-powered DSLs when writing a parser is clearly superior, such as when the input cannot be trusted.</p></blockquote>
<p>This is perhaps one of the most significant issues I have with a &#8220;language-powered DSL&#8221; (a.k.a., <a href="http://www.martinfowler.com/bliki/FluentInterface.html" rel="nofollow">fluent interfaces</a>).  If there&#8217;s even the slightest danger of untrusted input, then I strongly object to them.  However, people will disagree as to what constitutes &#8220;untrusted input&#8221;.  To my mind, this means any code coming from outside of the program, even it&#8217;s just a simple file that someone down in accounting can edit.  I may be overly paranoid on this point, however.</p>
<p>More importantly, the who concept of fluid interface is just good programming.  It&#8217;s a difficult skill to develop.  That some people refer to these as DSLs where others do not makes a lot of the point moot.  In Perl&#8217;s case, we do have a string eval which does this, but if implemented incorrectly, can lose some context (I&#8217;d love to easily be able to run an eval against a higher stack frame).</p>
<p>For myself, I distinguish between fluent interfaces and DSLs because the former, as mentioned, is just good programming and is not restricted to a problem domain while the latter is harder to implement, tends to be more restricted, but offers a greater expressiveness if suitably done.  Plus, by separating the lexing and parsing, you can gain a lot of flexibility if someone needs to submit their data in an XML format but your DSL is natural language.  Just write a separate lexer and use the same grammar!  The decoupling of these steps is trivial and since Perl is so powerful when it comes to text manipulation, it&#8217;s well-suited for this.</p>
<p>That being said, it really sounds like you and I don&#8217;t have a significant difference of opinion here once we recognize that we&#8217;re using different definitions for similar terms, hence the disconnect.</p>
<p>(And I really wish you had a preview button here <img src='http://www.cosine.org/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /></p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on An Idea for Process Teams by Ryan</title>
		<link>http://www.cosine.org/2007/08/02/idea-process-teams/#comment-4</link>
		<dc:creator>Ryan</dc:creator>
		<pubDate>Thu, 09 Aug 2007 05:25:18 +0000</pubDate>
		<guid isPermaLink="false">http://www.cosine.org/2007/08/02/idea-process-teams/#comment-4</guid>
		<description>Hmm.  Blogger doesn't do trackbacks?  

http://ryan-technorabble.blogspot.com/2007/08/flux.html</description>
		<content:encoded><![CDATA[<p>Hmm.  Blogger doesn&#8217;t do trackbacks?  </p>
<p><a href="http://ryan-technorabble.blogspot.com/2007/08/flux.html" rel="nofollow">http://ryan-technorabble.blogspot.com/2007/08/flux.html</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Domain Specific Languages by Ovid</title>
		<link>http://www.cosine.org/2007/08/05/domain-specific-languages/#comment-3</link>
		<dc:creator>Ovid</dc:creator>
		<pubDate>Mon, 06 Aug 2007 13:21:16 +0000</pubDate>
		<guid isPermaLink="false">http://www.cosine.org/2007/08/05/domain-specific-languages/#comment-3</guid>
		<description>Hi Cosine,

I think it would be good if you read up on the Wikipedia entry on DSLs (http://en.wikipedia.org/wiki/Domain-specific_programming_language).  Since I'm not sure what formatting is allowed here, I wrote up a journal entry on use.perl (http://use.perl.org/~Ovid/journal/34010).

Cheers,
Ovid</description>
		<content:encoded><![CDATA[<p>Hi Cosine,</p>
<p>I think it would be good if you read up on the Wikipedia entry on DSLs (http://en.wikipedia.org/wiki/Domain-specific_programming_language).  Since I&#8217;m not sure what formatting is allowed here, I wrote up a journal entry on use.perl (http://use.perl.org/~Ovid/journal/34010).</p>
<p>Cheers,<br />
Ovid</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Domain Specific Languages by hashbangperl</title>
		<link>http://www.cosine.org/2007/08/05/domain-specific-languages/#comment-2</link>
		<dc:creator>hashbangperl</dc:creator>
		<pubDate>Mon, 06 Aug 2007 08:50:45 +0000</pubDate>
		<guid isPermaLink="false">http://www.cosine.org/2007/08/05/domain-specific-languages/#comment-2</guid>
		<description>Cosine,

Please to be reading TFM ;)

Hint : perldoc -f do.

Aristotle ( http://use.perl.org/~Aristotle/journal/34004)couldn't be bothered to jump through the hoops of registration and logging in just to correct such a silly mistake, but it's monday morning and the Tax man and a slow paying client have annoyed me already so I'm cranky.

Also - more importantly than remembering to RTFM, is to not be dynamically eval'ing in the first place - ick! I have to agree with Aristotle on both counts here.

From the filename, I'd suggest you want to be reading a nice configuration file using one of the nice modules on CPAN. Lately I've  been using Config::Context, which gives me Apache style per host and directory configuration - incredibly handy for my Perl MVC application so I can deploy a web application once, but with configuration per host and path. Sweet as!</description>
		<content:encoded><![CDATA[<p>Cosine,</p>
<p>Please to be reading TFM <img src='http://www.cosine.org/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p>Hint : perldoc -f do.</p>
<p>Aristotle ( <a href="http://use.perl.org/~Aristotle/journal/34004" rel="nofollow">http://use.perl.org/~Aristotle/journal/34004</a>)couldn&#8217;t be bothered to jump through the hoops of registration and logging in just to correct such a silly mistake, but it&#8217;s monday morning and the Tax man and a slow paying client have annoyed me already so I&#8217;m cranky.</p>
<p>Also - more importantly than remembering to RTFM, is to not be dynamically eval&#8217;ing in the first place - ick! I have to agree with Aristotle on both counts here.</p>
<p>From the filename, I&#8217;d suggest you want to be reading a nice configuration file using one of the nice modules on CPAN. Lately I&#8217;ve  been using Config::Context, which gives me Apache style per host and directory configuration - incredibly handy for my Perl MVC application so I can deploy a web application once, but with configuration per host and path. Sweet as!</p>
]]></content:encoded>
	</item>
</channel>
</rss>
