Redirecting http requests
by A577127
Hello,
I want to bench the AeroGear UnifiedPush Server. I've decided to make it
quickly (and dirty) by editing the URL for GCM push notifications
(https://android.googleapis.com/gcm/send) to another (localhost:1234).
Since the UnifiedPush Server uses Google's java gcm server library, I've
downloaded the original code ( here
<https://code.google.com/p/gcm/source/checkout> ) and edited the
Constants.java to replace the "GCM_SEND_ENDPOINT" constant. It seems ok, I
create my .jar (gcm-server.jar) and install it locally with maven. Then I
edited the file unifiedpush-push/pom.xml to add the dependancy instead of
the old jar (com.ganyo).
Everything seems ok, I deployed my .war file. But surprise ! I can still
send push notifications to my device... (it's the first time I've been sad
that sending a push notification worked :))
I even checked inside the .war file
(jboss-eap-6.2\standalone\deployments\ag-push.war\WEB-INF\lib\gcm-server-1.0.2.jar\com\google\android\gcm\server\),
the file Constants.class contains my custom URL instead of the classic gcm
send url.
How is that possible ? Is the gcm send endpoint url stored somewhere I
missed ?
Thanks in advance
--
View this message in context: http://aerogear-dev.1069024.n5.nabble.com/Redirecting-http-requests-tp741...
Sent from the aerogear-dev mailing list archive at Nabble.com.
10 years, 8 months
security updates
by Erik Jan de Wit
Hi,
Bruno has created some PR’s to update our cordova plugins to no longer support 3.0.0 but update it to 3.4.0, because of a number of security issues that have been solved. Now of course we should encourage that people use the latest version, but this PR enforces it. Also Gorkem that invested quite some time to support different versions. So what should we pick enforce or encourage?
Cheers,
Erik Jan
10 years, 8 months
[UnifiedPush Server] Analytics / Metrics
by Matthias Wessendorf
Hello,
for a first round of collection some more data around the usage of the push
server (aka analytics/metrics), I'd propose we keep it very simple.
Overall, I see one major area of interest:
*metrics around push messages being sent:
- time of sending (using timezone of the server?)
- group of receivers (e.g. everyone or the provided cirterias(e.g. alias,
categories,...))
- payload (the entire payload, including custom keys - not only alert,
sound, badge etc)
This is a nice feature, and would enrich the UPS.
However, I can see also some interest around device specific metrics:
Today we obivously store all the registered devices, but we also remove
them from the database table if needed (to not send messages to phones that
would no longer receive them anyways).
Something that would be interesting as well, might be the following data:
- how often was an app has reached the push server (note: every time the
app starts, the metadata of the server is being updated (see [2])
- number of device-tokens / registrationIDs that have been removed, when
receiving errors from Apple/Google (see [3] or [4])
- number of devices, that were activly removed using our APIs (supported
only on Android/SimplePush due to Apple policy, see [5])
While the initial focus should be around the message related metrics,
capturing some device data is nice too.
Any thoughts ?
-Matthias
PS: Oh, for the longer run(...), I'd also like to see metrics like "was
mobile app opened due to a push notification". BUT that also requires some
more work/reseach on the client Push SDKs. But seriously, this is not a
priority for the next few months!
[1] https://issues.jboss.org/browse/AGPUSH-116
[2]
https://github.com/aerogear/aerogear-unifiedpush-server/blob/master/jaxrs...
[3]
https://github.com/aerogear/aerogear-unifiedpush-server/blob/master/push/...
[4]
https://github.com/aerogear/aerogear-unifiedpush-server/blob/master/push/...
[5]
https://github.com/aerogear/aerogear-unifiedpush-server/blob/master/jaxrs...
--
Matthias Wessendorf
blog: http://matthiaswessendorf.wordpress.com/
sessions: http://www.slideshare.net/mwessendorf
twitter: http://twitter.com/mwessendorf
10 years, 8 months
aerogear security and android
by marceloheck
Hello
I search a sample with aerogear and security server
in client
private AuthenticationModule authModule;
private String baseURL = "http://localhost:8080/servicos/service/auth";
private TextView status;
private Button login;
private Button logout;
private static final String LOG_TAG = login.class.getName();
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
Authenticator authenticator = new Authenticator(baseURL);
AuthenticationConfig authenticationConfig = new
AuthenticationConfig();
// authenticationConfig.setAuthType(AuthTypes.HTTP_BASIC);
authenticationConfig.setLoginEndpoint("/login");
authenticationConfig.setLogoutEndpoint("/logout");
authModule = authenticator.auth("login", authenticationConfig);
status = (TextView) findViewById(R.id.editText1);
login = (Button) findViewById(R.id.button1);
logout = (Button) findViewById(R.id.Button01);
button = (Button) findViewById(R.id.button1);
/* // Capture button clicks
button.setOnClickListener(new OnClickListener() {
public void onClick(View arg0) {
// Start NewActivity.class
Intent myIntent = new Intent(MainActivity.this,
login.class);
startActivity(myIntent);
}
});*/
login.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
authModule.login("nome", "senha", new
AbstractActivityCallback<HeaderAndBody>() {
@Override
public void onSuccess(HeaderAndBody data) {
Log.d(LOG_TAG, "Received ID: " + data.toString() );
logged(true);
// Start NewActivity.class
Intent myIntent = new Intent(MainActivity.this,
br.gov.pr.dc.sisdc.activities.MapActivity.class);
startActivity(myIntent);
// Toast.makeText(getActivity(), "logado",
Toast.LENGTH_SHORT).show();
}
@Override
public void onFailure(Exception e) {
displayError(e.getMessage());
// Toast.makeText(getActivity(), "erro",
Toast.LENGTH_SHORT).show();
Log.d(LOG_TAG, "error: " + e );
Intent myIntent = new Intent(MainActivity.this,
br.gov.pr.dc.sisdc.activities.MapActivity.class);
startActivity(myIntent);
}
});
}
});
is ok
but how to use the rest in android is authenticate and authorize cripty
token push etc... in other REST service?
is session? is value how?
...
URL BASE_URL = new URL("http://localhost:8080/servicos/service/");
PageConfig pageConfig = new PageConfig();
pageConfig.setLimitValue(5);
pageConfig.setMetadataLocation(PageConfig.MetadataLocations.WEB_LINKING);
PipeConfig pipeConfig = new PipeConfig(BASE_URL, AbrigoVO.class);
pipeConfig.setEndpoint("pessoa");
pipeConfig.setPageConfig(pageConfig);
pipeline = new Pipeline(BASE_URL);
pipeline.pipe(pessoaVO.class, pipeConfig);
LoaderPipe<pessoaVO> pipes = pipeline.get("pessoavo", mContext);
//LoaderPipe<pessoaVO> pipes = this.pipeline.get("pessoavo", fragment,
mContext);
//TODO
https://github.com/aerogear/aerogear-aerodoc-android/blob/master/src/org/...
pipes.read(readCallback);
Log.d(LOG_TAG, "Received ID: " );
return null;
} catch (Exception e) {
// TODO Need error handling
Log.e(LOG_TAG, e.getLocalizedMessage(), e);
Log.e(LOG_TAG, "sem serviço", e);
e.printStackTrace();
return null;
}
...
and security server jboss 7 ??
@Path("/pessoa/")
public interface pessoaResource {
@Produces(MediaType.APPLICATION_JSON)
public Response listar();
@GET
@Path("/{codigo}")
@Produces(MediaType.APPLICATION_JSON)
public Response obter(@PathParam("codigo") Long idpessoa);
}
i add
@Inject
private IdentityManagement configuration;
@Inject
private AuthenticationManager authenticationManager;
and
<interceptors>
<class>org.jboss.aerogear.security.interceptor.SecurityInterceptor</class>
</interceptors>
and
@Secure("admin")
but error injection
WELD-001408 Unsatisfied dependencies for type [EntityManager] with
qualifiers [@Default] at injection point [[field] @Inject private
org.jboss.aerogear.security.shiro.authz.GrantConfiguration.entityManager]
examples JaxRS and shiro and demo not funcional of soluction server and
client android
i connect database login password e groups for login
how to keep the connected User? have database or saved in the session?
can someone give me a practical example for using rest client server?
--
View this message in context: http://aerogear-dev.1069024.n5.nabble.com/aerogear-security-and-android-t...
Sent from the aerogear-dev mailing list archive at Nabble.com.
10 years, 8 months
Possible to send anything other than version number to simple push?
by Michi Oshima
Hi,
Yesterday I managed to send my first message to a browser. Thanks for all
your help.
I've tried sending a few different types of messages, and it so far appears
to me the only thing I can send to a simple push client is a version
number. Can a simple push client receive anything else other than version
numbers? If so, what does the sender need to do, and what does the client
need to do? (If there is a good example somewhere online I can work from
that also.)
My client application (javascript on browser) holds multiple types of data.
It would be nice if I can send a notification saying "there's an update
for this data type", rather than just "there's an update". Or, in general
it'd be nice if I can send more information than just a monotonically
increasing number.
Here's my setup:
- AeroGear Push Server 0.10.0 hosted on OpenShift.
- Sender is a JBoss app using org.jboss.aerogear.unifiedpush.JavaSender
(unifiedpush-java-client-0.5.0.jar).
- Client is a web browser using aerogear.js 1.4.0.
I read this documentation<http://aerogear.org/docs/specs/aerogear-push-messages/>,
but my wishful thinking refused to interpret it as saying: SimplePush
variants use the "extra simple-push object" only.
Thank you,
Michi Oshima
10 years, 8 months