private static Any createMsgCtxAccepted(long contextId) { Any any = ORB.init().create_any(); synchronized (msgBodyCtxAccepted) { msgBodyCtxAccepted.complete_msg().client_context_id = contextId; SASContextBodyHelper.insert(any, msgBodyCtxAccepted); } return any; }
private Any createMsgCtxError(long contextId, int majorStatus) { Any any = ORB.init().create_any(); synchronized (msgBodyCtxError) { msgBodyCtxError.error_msg().client_context_id = contextId; msgBodyCtxError.error_msg().major_status = majorStatus; SASContextBodyHelper.insert(any, msgBodyCtxError); } return any; }
SASContextBodyHelper.insert(any, contextBody); ServiceContext sc = new ServiceContext(sasContextId, codec.encode_value(any)); ri.add_request_service_context(sc, true /*replace existing context*/);
SASContextBodyHelper.insert(any, contextBody); ServiceContext sc = new ServiceContext(sasContextId, codec.encode_value(any)); ri.add_request_service_context(sc, true /*replace existing context*/);
SASContextBodyHelper.insert(any, contextBody); ServiceContext sc = new ServiceContext(SAS_CONTEXT_ID, codec.encode_value(any)); ri.add_request_service_context(sc, true /*replace existing context*/);
private static Any createMsgCtxAccepted(long contextId) { Any any = ORB.init().create_any(); synchronized (msgBodyCtxAccepted) { msgBodyCtxAccepted.complete_msg().client_context_id = contextId; SASContextBodyHelper.insert(any, msgBodyCtxAccepted); } return any; }
private static Any createMsgCtxAccepted(long contextId) { Any any = ORB.init().create_any(); synchronized (msgBodyCtxAccepted) { msgBodyCtxAccepted.complete_msg().client_context_id = contextId; SASContextBodyHelper.insert(any, msgBodyCtxAccepted); } return any; }
private Any createMsgCtxError(long contextId, int majorStatus) { Any any = ORB.init().create_any(); synchronized (msgBodyCtxError) { msgBodyCtxError.error_msg().client_context_id = contextId; msgBodyCtxError.error_msg().major_status = majorStatus; SASContextBodyHelper.insert(any, msgBodyCtxError); } return any; }
private Any createMsgCtxError(long contextId, int majorStatus) { Any any = ORB.init().create_any(); synchronized (msgBodyCtxError) { msgBodyCtxError.error_msg().client_context_id = contextId; msgBodyCtxError.error_msg().major_status = majorStatus; SASContextBodyHelper.insert(any, msgBodyCtxError); } return any; }
protected Any makeMessageInContext(org.omg.CORBA.ORB orb, long client_context_id, boolean discard_context) { MessageInContext msg = new MessageInContext(); msg.client_context_id = client_context_id; msg.discard_context = discard_context; SASContextBody contextBody = new SASContextBody(); contextBody.in_context_msg(msg); Any any = orb.create_any(); SASContextBodyHelper.insert( any, contextBody ); return any; }
protected Any makeEstablishContext(org.omg.CORBA.ORB orb, long client_context_id, AuthorizationElement[] authorization_token, IdentityToken identity_token, byte[] client_authentication_token) { EstablishContext msg = new EstablishContext(); msg.client_context_id = client_context_id; msg.client_authentication_token = client_authentication_token; msg.identity_token = identity_token; msg.authorization_token = authorization_token; SASContextBody contextBody = new SASContextBody(); contextBody.establish_msg(msg); Any any = orb.create_any(); SASContextBodyHelper.insert( any, contextBody ); return any; }
SASContextBodyHelper.insert(any, contextBody); ServiceContext sc = new ServiceContext(sasContextId, codec.encode_value(any)); ri.add_request_service_context(sc, true /*replace existing context*/);
SASContextBodyHelper.insert(any, contextBody); ServiceContext sc = new ServiceContext(sasContextId, codec.encode_value(any)); ri.add_request_service_context(sc, true /*replace existing context*/);
protected Any makeContextError(ServerRequestInfo ri, long client_context_id, int major_status, int minor_status, byte[] error_token) { ContextError msg = new ContextError(); msg.client_context_id = client_context_id; msg.error_token = error_token; msg.major_status = major_status; msg.minor_status = minor_status; SASContextBody contextBody = new SASContextBody(); contextBody.error_msg(msg); Any any = orb.create_any(); SASContextBodyHelper.insert( any, contextBody ); if (ri != null) { try { ri.add_reply_service_context(new ServiceContext(SASInitializer.SecurityAttributeService, codec.encode_value( any ) ), true); } catch (Exception e) { logger.error("Error setting reply service context:" + e); throw new org.omg.CORBA.NO_PERMISSION("SAS Error setting reply service context: " + e, MinorCodes.SAS_TSS_FAILURE, CompletionStatus.COMPLETED_MAYBE); } } return any; }
ServiceContext encodeSASContextBody(SASContextBody sasBody) { // // Create encapsulation for SAS context body // Any a = getOrb().create_any(); SASContextBodyHelper.insert(a, sasBody); // wrap the ANY in an encapsulation byte[] data; try { data = codec.encode_value(a); } catch (UserException ex) { MARSHAL me = new MARSHAL("cannot encode local security descriptor", 0, CompletionStatus.COMPLETED_NO); me.initCause(ex); throw me; } return new ServiceContext(SecurityAttributeService.value, data); }
protected Any makeCompleteEstablishContext(ServerRequestInfo ri, long client_context_id, SASPolicyValues sasValues) { CompleteEstablishContext msg = new CompleteEstablishContext(); msg.client_context_id = client_context_id; msg.context_stateful = sasValues.stateful; msg.final_context_token = new byte[0]; SASContextBody contextBody = new SASContextBody(); contextBody.complete_msg(msg); Any any = orb.create_any(); SASContextBodyHelper.insert( any, contextBody ); if (ri != null) { try { ri.add_reply_service_context(new ServiceContext(SASInitializer.SecurityAttributeService, codec.encode_value( any ) ), true); } catch (Exception e) { logger.error("Error setting reply service context:" + e); throw new org.omg.CORBA.NO_PERMISSION("SAS Error setting reply service context: " + e, MinorCodes.SAS_TSS_FAILURE, CompletionStatus.COMPLETED_MAYBE); } } return any; }
SASContextBodyHelper.insert(any, contextBody); ServiceContext sc = new ServiceContext(sasContextId, codec.encode_value(any)); ri.add_request_service_context(sc, true /*replace existing context*/);
SASContextBodyHelper.insert(any, contextBody); ServiceContext sc = new ServiceContext(sasContextId, codec.encode_value(any)); ri.add_request_service_context(sc, true /*replace existing context*/);
SASContextBodyHelper.insert(any, contextBody); ServiceContext sc = new ServiceContext(SAS_CONTEXT_ID, codec.encode_value(any)); ri.add_request_service_context(sc, true /*replace existing context*/);
SASContextBodyHelper.insert(any, contextBody); ServiceContext sc = new ServiceContext(SAS_CONTEXT_ID, codec.encode_value(any)); ri.add_request_service_context(sc, true /*replace existing context*/);