The jetty xml is simply a thin skin over java itself, so anything you can do in the jetty xml you can do in an embedded way.
This is a link to our documentation on embedding jetty.
http://www.eclipse.org/jetty/documentation/current/advanced-embedding.html
It is not really clear to me what you are trying to do here, but the follow example explains a bit about security realms, etc.