Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0bea0a1a authored by ahmedsh's avatar ahmedsh Committed by Daniel Hillenbrand
Browse files

SEEMP: Adding auth framework for outgoing SMS messages.

This change adds the APIs required to register an authorization agent
in order to allow/reject outgoing SMS messages and the core service
that implements the sms security model.

Change-Id: I5f7195dbdf1d6ff9e0bc5b3118d4a585b51bead8
parent adedad8c
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -468,6 +468,8 @@ LOCAL_SRC_FILES += \
	packages/services/Proxy/com/android/net/IProxyPortListener.aidl \
	core/java/android/service/quicksettings/IQSService.aidl \
	core/java/android/service/quicksettings/IQSTileService.aidl \
	telephony/java/com/android/internal/telephony/ISmsSecurityService.aidl \
	telephony/java/com/android/internal/telephony/ISmsSecurityAgent.aidl \

# The following are native binders that need to go with the native component
# at system/update_engine/binder_bindings/. Use relative path to refer to them.
+5 −0
Original line number Diff line number Diff line
@@ -1107,6 +1107,11 @@
    <permission android:name="android.permission.MODIFY_CELL_BROADCASTS"
                android:protectionLevel="signature|privileged" />

    <!-- Allows an application to authorize outgoing SMS messages.
         @hide -->
    <permission android:name="android.permission.AUTHORIZE_OUTGOING_SMS"
                android:protectionLevel="signature" />

    <!-- =============================================================== -->
    <!-- Permissions for setting the device alarm                        -->
    <!-- =============================================================== -->
+6 −0
Original line number Diff line number Diff line
@@ -2951,4 +2951,10 @@
    <!-- If enabled, capacitive keys will only light up when pressed.
         Otherwise, the buttons will light up whenever the user interacts with the device -->
    <bool name="config_buttonLightOnKeypressOnly">false</bool>

    <!-- The duration (in milliseconds) for the outgoing sms authorization request to timeout.-->
    <integer name="config_sms_authorization_timeout_ms">0</integer>

    <!-- Enable sms authorization framework-->
    <bool name="config_sms_authorization_enabled">false</bool>
</resources>
+3 −0
Original line number Diff line number Diff line
@@ -2851,4 +2851,7 @@
  <java-symbol type="bool" name="use_lock_pattern_drawable" />
  <java-symbol type="drawable" name="lockscreen_notselected" />
  <java-symbol type="drawable" name="lockscreen_selected" />

  <java-symbol type="integer" name="config_sms_authorization_timeout_ms" />
  <java-symbol type="bool" name="config_sms_authorization_enabled" />
</resources>
+51 −0
Original line number Diff line number Diff line
/*
 * Copyright (c) 2016, The Linux Foundation. All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are
 * met:
 *   * Redistributions of source code must retain the above copyright
 *     notice, this list of conditions and the following disclaimer.
 *   * Redistributions in binary form must reproduce the above
 *     copyright notice, this list of conditions and the following
 *     disclaimer in the documentation and/or other materials provided
 *     with the distribution.
 *   * Neither the name of The Linux Foundation nor the names of its
 *     contributors may be used to endorse or promote products derived
 *     from this software without specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
 * ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
 * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
 * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
 * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
 * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */

package com.android.internal.telephony;

import com.android.internal.telephony.SmsAuthorizationRequest;

/**
 * ISmsSecurityAgent enhances the security of outgoing SMS messages by allowing trusted system
 * components to inspect and authorize or reject outgoing SMS messages.
 *
 * @hide
 **/
interface ISmsSecurityAgent {
    /**
     * Called when a SMS message is queued for dispatch allowing a registered
     * agent to decide on whether to accept/reject the request to send an SMS message.
     * <b>Unless the agent rejects the request within the OEM specific timeout, the SMS
     * will be sent.</b>
     * @param request the object containing information regarding the message and
     *                through which the agent can accept/reject the request.
     */
    void onAuthorize(in SmsAuthorizationRequest request);

}
Loading